From help-octave-request at bevo dot che dot wisc dot edu Wed Feb 4 06:45:56 2004 Subject: Re: subscripted assignment dimension mismatch (NDArray) From: Nathan Weisz To: Taku J SATO , Octave_post Date: Wed, 4 Feb 2004 13:42:50 +0100 Hi taku, is this what you wanted to do? octave:42> test = zeros(4,4,2); octave:43> test(1:2,1,1) = ones(1) test = ans(:,:,1) = 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 ans(:,:,2) = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 HTH, Nathan Am 04.02.2004 um 13:31 schrieb Taku J SATO: > Hi, All, > > I have just now encountered one problem using octave-2.1.53: > > ----- > octave:1> test = zeros(4,4,2); > octave:2> test(1:2,1,1) = ones(2,1) > error: subscripted assignment dimension mismatch > error: assignment failed, or no method for `matrix = matrix' > error: evaluating assignment expression near line 2, column 15 > ----- > > This partial assignment of NDArray by a matrix was possible with > octave-2.1.52. Does anyone know how to overcome it? > > all the best, > taku > > -- > Taku J Sato > National Institute for Materials Science, > 1-2-1 Sengen, Tsukuba, Ibaraki 305-0047, Japan > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- > ------------------------------------------------------------- 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 -------------------------------------------------------------