[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A(I) = X when X is a scalar
From: |
dirk |
Subject: |
A(I) = X when X is a scalar |
Date: |
Fri, 18 Jun 1999 18:47:30 +0200 (SAST) |
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.
Dirk Laurie
---------------------------------------------------------------------
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
---------------------------------------------------------------------
- A(I) = X when X is a scalar,
dirk <=