help-octave
[Top][All Lists]
Advanced

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

Re: foo = eye (5); foo(1:3,:)(1:6) = 1


From: Dmitri A. Sergatskov
Subject: Re: foo = eye (5); foo(1:3,:)(1:6) = 1
Date: Thu, 18 Mar 2004 15:30:53 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Etienne Grossmann wrote:
  Hello,


I was surprised to see that
   foo = eye (5); foo(1:3,:)(1:6) = 1


   error: in indexed assignment of matrix, last lhs index must be ()
   error: assignment failed, or no method for `matrix = scalar'
   error: evaluating assignment expression near line 32, column 32

doesn't work w/ octave-2.1.53. Is that normal, or a bug?


For what it worth it seems to be compatible to matlab (6.5):



>> foo = eye (5); foo(1:3,:)(1:6) = 1


??? Error: () Indexing must appear last in an index expression.

>>



Etienne


Regards,

Dmitri.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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