From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 24 12:53:41 2000 Subject: Re: reshape in Octave From: "A. Scottedward Hodel" To: Neil Ottenstein , help-octave Date: Mon, 24 Jan 2000 12:53:30 -0600 > on 1/24/00 12:23 PM, Neil Ottenstein at nottenst at pop500 dot gsfc dot nasa dot gov wrote: > > reshape in Matlab 5.3 allows the following line: > > ppoly2=reshape(fread(fid,273,'float64'),[3,13,7]); > > unfortunately, Octave only allows a reshape command which reshapes to an mxn > as opposed to an mxnxp > matrix. > > Do any quick fixes come to mind? I believe I am working with Octave 2.0.14. > It was obtained in November. > > Thanks, > > Neil Octave does not (directly) support multidimensional arrays. A kludge around this would be to use the (one-dimensional) list data structure in the bleeding-edge release, but this would require writing your own reshape to treat a list of 2-d arrays (or a list of lists of one-d arrays). THe subject of multidimensional arrays was discussed last fall on the help-octave mailing list; you can read the thread at the archives at http://www.che.wisc.edu/octave/ -- A S Hodel Assoc. Prof. Dept Elect and Computer Eng, Auburn Univ,AL 36849-5201 On leave at NASA Marshall Space Flight Center (256) 544-1426 Address until 31 July 2000:Mail Code TD-55, MSFC, Alabama, 35812 http://www.eng.auburn.edu/~scotte ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------