setdiff output differs from matlab

Sergei Steshenko sergstesh at yahoo.com
Thu Sep 18 08:08:43 CDT 2008




--- On Thu, 9/18/08, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:

> From: John W. Eaton <jwe at bevo.che.wisc.edu>
> Subject: Re: setdiff output differs from matlab
> To: soren at hauberg.org
> Cc: sergstesh at yahoo.com, bug at octave.org, Michael at cae.wisc.edu, "Ferris" <ferris at cs.wisc.edu>, "John W. Eaton" <jwe at bevo.che.wisc.edu>
> Date: Thursday, September 18, 2008, 5:26 AM
> On 18-Sep-2008, soren at hauberg.org wrote:
> 
> | >> column_vector(2:vector_length) +=
> row_vector(2:vector_length)
> | ??? column_vector(2:vector_length) +=
> row_vector(2:vector_length)
> |                                      |
> | Error: The expression to the left of the equals sign is
> not a valid target for
> | an assignment.
> | 
> | So, Matlab behaves like Octave.
> 
> No, not exactly.  Matlab is complaining that += doesn't
> work.  The
> thing on the left side of the equals sign is
> 
>   column_vector(2:vector_length) +
> 
> and that is what "is not a valid target for
> assignment".
> 
> jwe

The expression to be tried in Matlab is:

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

Thanks,
  Sergei.


      


More information about the Bug-octave mailing list