help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: translation from matlab to octave


From: Ozzy Lash
Subject: Re: translation from matlab to octave
Date: Wed, 14 Jul 2010 22:37:43 -0500

On Wed, Jul 14, 2010 at 8:58 PM, insipido <address@hidden> wrote:
> How should I translate m = v(:).' from matlab to octave ?
>
> v =
>
>      1     2     3     4
>      5     6     7     8
>      9    10    11    12
>
>  >> m = v(:).'
>
> m =
>
>      1     5     9     2     6    10     3     7    11     4     8
> 12

That should work as is, assuming that what you have listed is what you expect:

octave:4> v = [1,2,3,4;5,6,7,8;9,10,11,12]
v =

    1    2    3    4
    5    6    7    8
    9   10   11   12

octave:5> m=v(:).'
m =

    1    5    9    2    6   10    3    7   11    4    8   12



reply via email to

[Prev in Thread] Current Thread [Next in Thread]