From help-octave-request at bevo dot che dot wisc dot edu Thu Sep 4 23:09:38 2003 Subject: arrays From: "John W. Eaton" To: Nathan Weisz Cc: help-octave at bevo dot che dot wisc dot edu Date: Thu, 4 Sep 2003 23:09:30 -0500 On 15-Aug-2003, Nathan Weisz wrote: | I'd like to repeat a question posted by Phil Reardon about 2 years ago: | > Can octave treat three dimensional arrays like A(i,j,k)? It seems to | > accept this form on the right side an assignment, but not the left. | > What is the rule here? Thanks in advance! | | The short answer to that was: no. | | I'm asking because I get error messages when trying to create | 3-dimensional arrays in Matlab-style, e.g.: | > octave:29> a = rand(5); | > octave:30> b= rand(5); | > octave:31> c = a; | > octave:32> c(:,:,2) = b; | > error: invalid number of indices (3) for indexed assignment | > error: assignment failed, or no method for `matrix = matrix' | > error: evaluating assignment expression near line 32, column 10 | | Something I can do about it? Some work is currently being done (see the octave-maintainers mailing list for some recent discussion). I hope to have some basics working within a few snapshots from now. jwe ------------------------------------------------------------- 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 -------------------------------------------------------------