From help-octave-request at bevo dot che dot wisc dot edu Fri Jun 18 11:48:56 1999 Subject: A(I) = X when X is a scalar From: dirk at calvyn dot puk dot ac dot za To: help-octave at bevo dot che dot wisc dot edu (Octave Help List) 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 ---------------------------------------------------------------------