[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operation x=x(:)
From: |
Wonkoo Kim |
Subject: |
Re: operation x=x(:) |
Date: |
Wed, 05 May 1999 17:04:01 -0400 |
John W. Eaton wrote:
>
> On 5-May-1999, address@hidden <address@hidden> wrote:
>
> | One of the biggest drawbacks to use it is the missing
> | 'x=x(:)' operation.
>
> I'm not sure why you say that it is missing. Octave has understood
> colon indexing for a long time. In versions 2.0.12 and later, I
> believe that it works in a Matlab-compatible way no matter what the
> value of do_fortran_indexing. For earlier versions, you had to set
> do_fortran_indexing to 1 (or, for really ancient versions, "yes") to
> enable compatible behavior.
>
> GNU Octave, version 2.0.14 (i686-pc-linux-gnu).
> Copyright (C) 1996, 1997, 1998, 1999 John W. Eaton.
> This is free software with ABSOLUTELY NO WARRANTY.
> For details, type `warranty'.
>
> octave:1> x = rand (2)
> x =
>
> 0.14962 0.13838
> 0.98633 0.30464
>
> octave:2> x = x(:)
> x =
>
> 0.14962
> 0.98633
> 0.13838
> 0.30464
However, x = x(:) does not convert a row vector to a column vector
(Octave 2.0.13 for OS/2). Though I don't mind this, but the
original poster would, as this is a different behavior from Matlab.
//-------------------------------------------------------------------
// Wonkoo Kim <address@hidden>
- operation x=x(:), oliver . eichler, 1999/05/05
- operation x=x(:), John W. Eaton, 1999/05/05
- Re: operation x=x(:),
Wonkoo Kim <=
- Re: operation x=x(:), John W. Eaton, 1999/05/05
- Re: operation x=x(:), Mike Miller, 1999/05/05
- Re: operation x=x(:), John Logsdon, 1999/05/06
- Re: operation x=x(:), Ted Harding, 1999/05/06
- Re: operation x=x(:), John W. Eaton, 1999/05/06