plot particle movement between some fixed points in 3D

2 views (last 30 days)
i want to plot a moving particle between some predefined point.in time t (x1,y1,z1), time t+1 (x2,y2,z2) and t+2 (x3,y3,z3)).i tried with plot3 and scatter3 but still i cant see correct movement.anyone can help?thanks in advance
  2 Comments
Chad Greene
Chad Greene on 4 Oct 2014
More details might help answer the question. Would it help to change the view angle, or perhaps zoom? If you're making an animation, are your axes the same in each frame, or are the axis limits automatically updating themselves in each frame, in which case little motion would be evident.
mostafa khalili
mostafa khalili on 4 Oct 2014
Edited: mostafa khalili on 5 Oct 2014
Chad Greene Thanks for your comment. this code has been uploaded by Teja Muppirala before.
if true
% A = interpft(rand(1,10),1001);
B = interpft(rand(1,10),1001);
C = interpft(rand(1,10),1001);
t = 0:0.001:1;
figure
h = plot3(nan,nan,nan,'ro');
axis equal vis3d
box on
for n = 1:numel(t)
set(h,{'Xdata','Ydata','Zdata'},{A(n) B(n) C(n)});
title(t(n));
drawnow;
end
end
i want to apply my desired points but i cant define them in this structure.it seems to be easier but i dont know how should i define fixed points because i dont want them to be random.

Sign in to comment.

Answers (0)

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!