inconsistent row <-> column sub-vector behavior
Sergei Steshenko
sergstesh at yahoo.com
Fri Aug 22 11:07:42 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: inconsistent row <-> column sub-vector behavior
> To: sergstesh at yahoo.com
> Cc: bug-octave at octave.org
> Date: Friday, August 22, 2008, 8:33 AM
> On 22-Aug-2008, Sergei Steshenko wrote:
>
> | column_vector(2:vector_length) =
> row_vector(2:vector_length)
>
> This is allowed for compatibility.
>
> | column_vector(2:vector_length) +=
> row_vector(2:vector_length)
>
> All the OP= operators are simply syntactic sugar for
>
> LHS = LHS OP RHS
>
> so will fail if LHS OP RHS is non-conformant.
>
> I don't think this is a bug.
>
> jwe
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 ?
But, anyway, the deciding factor should be Matlab compatibility, shouldn't
it ?
Again, could anyone please check how Matlab behaves ?
Thanks,
Sergei.
More information about the Bug-octave
mailing list