[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Attacking ND arrays
From: |
Ryan Peterson |
Subject: |
Attacking ND arrays |
Date: |
Wed, 22 Jun 2005 14:48:25 -0500 |
Is there a "good" way to take 2d slices of ND matrices, either in
octave-forge or upcoming in future versions of octave? Say I have a 4d
matrix named foo with 5 values in each direction and I want to look at a
slice of it. Intuitively, I went for this:
b=foo(4,3,:,:);
imagesc(b)
But got an error about transposing ND arrays. I remember reading something
about someone doing this within C but am curious if and how people have done
this in octave. The most straightforward method I can think of is a loop
but that can be time consuming. Any recommendations/suggestions?
Thanks,
Ryan Peterson
-------------------------------------------------------------
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
-------------------------------------------------------------
- Attacking ND arrays,
Ryan Peterson <=