[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple 3-D plotting
From: |
Donald J Bindner |
Subject: |
Re: Simple 3-D plotting |
Date: |
Sat, 26 Aug 2006 08:43:36 -0500 |
User-agent: |
Mutt/1.5.9i |
On Sat, Aug 26, 2006 at 09:43:54AM +0200, Miroslaw Kwasniak wrote:
> On Fri, Aug 25, 2006 at 05:29:42PM -0400, Tony Fernandez wrote:
> > Hello all,
> >
> >
> >
> > I am trying to plot, say, 5 points in a three dimensional space, and connect
> > these points with segments between each consecutive point. This will give
> > me only four segments. From point1 to point2, them from point2 to point3,
> > and so on.
> >
> >
> >
> > Points are: ( x1, y1, z1 ), ( x2, y2, z2 ), ., ( x5, y5, z5 )
> >
> >
> >
> > How can I draw/plot these four segments without ending up with a mesh?
>
> plot3(x,y,z)
>
> where x,y,z are vectors with length = 5
On a system without plot3() you can also get by with something
like this:
octave:1> x = [0:.1:1]; y = x.^2; z = sqrt(x);
octave:2> xx = [x;x]; yy = [y;y]; zz = [z;z];
octave:3> mesh(xx,yy,zz)
You effectively draw the curve twice.
--
Don Bindner <address@hidden>