help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plotting a selected vector from a 3D data set


From: Shai Ayal
Subject: Re: Plotting a selected vector from a 3D data set
Date: Thu, 07 Dec 2006 22:15:15 +0200
User-agent: Thunderbird 2.0a1 (Windows/20060724)

I did not test it, but does the following solve your problem?

plot(squeeze(m(1,1,:))

Shai

Mark Esplin wrote:
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



_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]