[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with data conversion
From: |
Andy Buckle |
Subject: |
Re: Problem with data conversion |
Date: |
Thu, 8 Dec 2011 13:06:17 +0000 |
On 8 December 2011 12:43, Raasch, Hendrik (external)
<address@hidden> wrote:
>
> Hello,
>
> I have a problem with matrices. Check the following:
>
> octave:88> p_v
> p_v =
>
> 1 1 1 1
>
> octave:89> time_tmp
> time_tmp =
>
> 3.8593e+08 3.8593e+08 3.8593e+08 3.8593e+08
>
> octave:90> [rot90(time_tmp), rot90(p_v)]
> ans =
>
> 255 1
> 255 1
> 255 1
> 255 1
>
>
> Why is the time_tmp data converted from an floating point value into an eight
> bit integer??
>
> I assume, that I have just done something wrong. So, can someone tell me what
> is the correct way of doing this?
>
> Regards,
> HR
I guess because p_v is uint8, and you are concatenating with it.
>[rot90(time_tmp) rot90(p_v)]
ans =
255 1
255 1
255 1
255 1
>[rot90(time_tmp) rot90(double(p_v))]
ans =
385930000 1
385930000 1
385930000 1
385930000 1
>
--
/* andy buckle */