help-octave
[Top][All Lists]
Advanced

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

A(I) = X when X is a scalar


From: John W. Eaton
Subject: A(I) = X when X is a scalar
Date: Fri, 18 Jun 1999 14:30:52 -0500 (CDT)

On 18-Jun-1999, address@hidden <address@hidden> wrote:

| The following construction does not work in Octave 2.0.13:
| 
| do_fortran_indexing=1;
| A=zeros(4);
| j=[1 4 6 7 10 13];
| A(j)=2;
| 
| But it is OK to say:
| 
| A(j)=2*ones(size(j));
| 
| The error message is:
| 
| error: A(I) = X: X must be a scalar or a matrix with the same size as I
| 
| which seems to suggest that the construction should work.

This seems to work correctly in my current sources (I think it was
reported shortly after 2.0.14 was released), so it should work
in the next release.

Thanks,

jwe



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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