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: plot! please help..
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 8
Registered: 11/27/12
plot! please help..
Posted: Dec 6, 2012 3:54 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello everyone!
I have a matrix with the coordinates of objects (x,y,z) changing with time.
I need to plot 2 times the set of values, one being a scatter3 and another the trajectory, and so, see the moving object i need to plot a new scatter3 each time, and delete the previous, but to remain with the line, so the trajectory can be clear.

My code:

a = 0;
while t < T

a = a +1;
scatter3(Xx(:), Yy(:), Zz(:), Ar(:), 'k', 'EraseMode','xor');
plot3(X1, Y1, Z1, ':k', X2, Y2, Z2, ':k', X3, Y3, Z3, ':k');
grid on
xlim([-40 40]);
ylim([-40 40]);
zlim([-40 40]);

Mov(a) = getframe(gcf);


I'm trying to hold on just the plot3, but every time i try to do it the scatter3 hold's on too...

Thank u *

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

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.