[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Plotting a selected vector from a 3D data set
From: |
Mark Esplin |
Subject: |
Plotting a selected vector from a 3D data set |
Date: |
Thu, 07 Dec 2006 10:32:56 -0500 |
If I try to plot a vector from a 3D data set it doesn't work for the 3rd
dimension. For example this doesn't work:
m = rand(10,10,10);
plot(m(1,1,:))
It gives me the error: transpose not defined for N-d objects
I tried it on GNU Octave, version 2.1.72 (i486-pc-linux-gnu) and version
2.9.6.
The other dimensions work as I would expect. The following both work:
plot(m(:,1,1))
or
plot(m(1,:,1))
I don't know if this is bug or the lack of a feature that I would find
useful. A work around is plot(reshape(m(1,1,:),10,1)), but it seems more
awkward than it should be.
-Mark Esplin
- Plotting a selected vector from a 3D data set,
Mark Esplin <=