Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Plotting many 2D curves on 3D Axis
Replies: 4   Last Post: Dec 21, 2010 4:11 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Amr Sadek

Posts: 9
Registered: 2/13/10
Re: Plotting many 2D curves on 3D Axis
Posted: Dec 21, 2010 4:11 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Walter Roberson <roberson@hushmail.com> wrote in message <ier1ss$g7i$1@nrc-news.nrc.ca>...
> On 10-12-21 01:43 PM, Amr Sadek wrote:
> > Walter Roberson <roberson@hushmail.com> wrote in message
> > <iequ7a$e0s$1@nrc-news.nrc.ca>...

> >> On 10-12-21 12:52 PM, Amr Sadek wrote:
> >>

> >> > I have many x,y data; x1,y1_x2,y2_x3,y3_...... Each curve is related to a
> >> > specific z value:(x1,y1) curve for z1 and (x2,y2) curve for z2 and so on
> >> >
> >> > I want to plot the 2D curve (x,y) on a 3D axis in which the third axis will
> >> > refere to the corresponding z value for each (x,y) curve.
> >> >
> >> > How can I do that?

> >>

> >> Use plot3() or line()
> >
> > It didnt work because the lenght of z vector is not the same as x,y. For
> > example the x1,y1 curve occurs at z1=25, and x2,y2 at z2=22, and so on..Using
> > plot3() will not help. and iit dispaly an error message saying matrix do not
> > have the same lengh.

> plot3(x1, y1, repmat(z1,size(x1)))
> hold on
> plot3(x2, y2, repmat(z2,size(x2)))
> plot3(x3, y3, repmat(z3,size(x3)))
> and so on.
> Yes it works

Thank you so much

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.