octave-maintainers
[Top][All Lists]
Advanced

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

Re: proper lvalues and whatnot


From: John W. Eaton
Subject: Re: proper lvalues and whatnot
Date: Mon, 21 Aug 2000 02:17:03 -0500 (CDT)

On 18-Aug-2000, Ross A. Lippert <address@hidden> wrote:

| To me, and maybe not to anyone else, what seems mmore logical is
| v(I) += x(I) should be implemented as
| for i=1:length(I), v(I(i)) += x(I(i)); end

That might be nice in some instances, but I think Octave must behave
as though

  a(idx) += b

and

  a(idx) = a(idx) + b

are equivalent.  I'm afraid that the behavior of the second statement
is not equivalent to your loop if idx has repeated values.

jwe



reply via email to

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