Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
plot line between point a,b and c

Subject: plot line between point a,b and c

From: Hai

Date: 5 Oct, 2010 18:03:20

Message: 1 of 2

Hello everybody.
I these points:
a = (x1,y1,z1)
b = (x2,y2,z2)
c = (x3,y3,z3)

I've already managed to plot a line from a to b, but I'm having trouble with plotting an additional line from b to c. I want the two lines to be plotted in the same coordinate system. Is there anybody who knows how to do this?

Peter

Subject: plot line between point a,b and c

From: Sean

Date: 5 Oct, 2010 18:35:22

Message: 2 of 2

"Hai " <paraplykongen@hotmail.com> wrote in message <i8fp98$dbr$1@fred.mathworks.com>...
> Hello everybody.
> I these points:
> a = (x1,y1,z1)
> b = (x2,y2,z2)
> c = (x3,y3,z3)
>
> I've already managed to plot a line from a to b, but I'm having trouble with plotting an additional line from b to c. I want the two lines to be plotted in the same coordinate system. Is there anybody who knows how to do this?
>
> Peter

a = [1,1,1]
b = [2,2,2]
c = [3,5,3]

v =[a;b;c];
plot3(v(:,1),v(:,2),v(:,3))

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us