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?! help please

Subject: plot?! help please

From: Iris

Date: 6 Dec, 2012 17:58:08

Message: 1 of 2

Hello!
Another question! Imagine that i have N particles and I want to plot them, so I do something like this:

plot3(X(1, Y, Z1, ':k', X2, Y2, Z2, ':k', X3, Y3, Z3, ':k'.............., XN, YN, ZN, ':k');

how can I do this without having to write the N coordinates in the plot?

Thank you!

Subject: plot?! help please

From: Steven_Lord

Date: 6 Dec, 2012 18:10:59

Message: 2 of 2



"Iris " <my.velvet.faerie.tale@gmail.com> wrote in message
news:k9qmbg$d1s$1@newscl01ah.mathworks.com...
> Hello! Another question! Imagine that i have N particles and I want to
> plot them, so I do something like this:
>
> plot3(X(1, Y, Z1, ':k', X2, Y2, Z2, ':k', X3, Y3, Z3, ':k'..............,
> XN, YN, ZN, ':k');
>
> how can I do this without having to write the N coordinates in the plot?

If you don't want them connected by lines, SCATTER3.

If you do want them connected by lines, store them in matrices not
individual vectors.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

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