vermeij | 1 Feb 2010 16:23
Picon

typecast sometimes produces a column vector, not a row vector

To: bug <at> octave.org
Cc: arjan
Subject: typecast sometimes produces a column vector, not a row vector
--------
Bug report for Octave 3.0.1 configured for i486-pc-linux-gnu

Description:
-----------

In general the typecast function produces a row vector.
In some cases, however, it produces a column vector.

Repeat-By:
---------

According to the manual (help typecast)

    X = uint16 ([1, 65535]);
    typecast (X, 'uint8')

produces

     1    0  255  255

This works. I would expect then this

    X = uint16 ([65535]);
    typecast (X, 'uint8')

to produce
(Continue reading)

Jaroslav Hajek | 2 Feb 2010 13:59
Picon

Re: typecast sometimes produces a column vector, not a row vector

On Mon, Feb 1, 2010 at 4:23 PM,  <vermeij <at> nurc.nato.int> wrote:
> To: bug <at> octave.org
> Cc: arjan
> Subject: typecast sometimes produces a column vector, not a row vector
> --------
> Bug report for Octave 3.0.1 configured for i486-pc-linux-gnu
>
> Description:
> -----------
>
> In general the typecast function produces a row vector.
> In some cases, however, it produces a column vector.
>
> Repeat-By:
> ---------
>
> According to the manual (help typecast)
>
>    X = uint16 ([1, 65535]);
>    typecast (X, 'uint8')
>
> produces
>
>     1    0  255  255
>
> This works. I would expect then this
>
>    X = uint16 ([65535]);
>    typecast (X, 'uint8')
>
(Continue reading)


Gmane