Animation delete previous point
Afficher commentaires plus anciens
Hi
I'm trying to make an animation, where I only display one point at the time, right now the trajectory stays, and I want only one point displayed
any suggestions, i want it to look like this: https://www.youtube.com/watch?v=q1dqIcLi3N0
this is my code so far
x= Ball(:,1);
y= Ball(:,2);
%%
figure
curve = animatedline('marker','*','Color','r');
set(gca,'Xlim',[-6000 6000], 'Ylim',[-4000 4000])
for i= 1:length(Ball)
addpoints(curve,x(i),y(i));
drawnow
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Animation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!