inconsistent row <-> column sub-vector behavior

Sergei Steshenko sergstesh at yahoo.com
Fri Aug 22 12:26:47 CDT 2008




--- On Fri, 8/22/08, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:

> From: John W. Eaton <jwe at bevo.che.wisc.edu>
> Subject: Re: inconsistent row <-> column sub-vector behavior
> To: sergstesh at yahoo.com
> Cc: bug-octave at octave.org
> Date: Friday, August 22, 2008, 9:19 AM
> On 22-Aug-2008, Sergei Steshenko wrote:
> 
> | Intuitively it's a bug; LHS type (row or column) is
> known even before
> | the OP=, so the necessary type conversion routine can be
> called easily
> | and early enough by the interpreter.
> | 
> | At all, in a type-loose language if I deal with vectors,
> why should I care
> | about its column or row nature ? 
> 
> Neither Octave nor Matlab really have "vectors". 
> All objects have at
> least two dimensions, so orientation (almost) always
> matters.  There
> are some special cases where Matlab plays fast and loose
> with
> orientation and lets slide some things that arguably should
> be
> errors.  Octave generally tries to do the compatible thing
> for these
> cases to be nice to users who want to run Matlab code in
> Octave.
> 
> | But, anyway, the deciding factor should be Matlab
> compatibility, shouldn't
> | it ?
> | 
> | Again, could anyone please check how Matlab behaves ?
> 
> Matlab does not have any OP= operators.
> 
> jwe

If fails the same way if I write

column_vector(2:vector_length) = column_vector(2:vector_length) + row_vector(2:vector_length)
.

What does Matlab do in this case ?

Thanks,
  Sergei.


      


More information about the Bug-octave mailing list