Iris
Posts:
8
Registered:
11/27/12


plot! please help..
Posted:
Dec 6, 2012 3:54 PM


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'); view(3) grid on xlabel('x') ylabel('y') zlabel('z') xlim([40 40]); ylim([40 40]); zlim([40 40]); Mov(a) = getframe(gcf);
end 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 *

