From help-request at octave dot org Thu Feb 17 12:31:50 2005 Subject: Re: permute three dimensional Array From: Quentin Spencer To: Hugo Neto CC: help at octave dot org Date: Thu, 17 Feb 2005 12:35:07 -0600 Hugo Neto wrote: > The command performed is: > > permute(Example(:,:,2), [2 3 1]) % "Example" array has the > length mentioned before The problem is that Example(:,:,2) is a 2-dimensional array, so calling permute with 3 dimensions returns an error. On the other hand, permute(Example, [2 3 1]) permute(Example(:,:,2), [2 1]) are both valid usages of permute. Note that permute(Example(:,:,2), [2 1]) is equivalent to Example(:,:,2)', the transpose. regards, Quentin ------------------------------------------------------------- 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 -------------------------------------------------------------