To be or not to be
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Lard Guard
le 3 Mai 2018
Commenté : Rena Berman
le 12 Déc 2019
im trying to make a code to show the movements of particles on a graph. whenever the graph is plotted the particles dont move. How do I make the plots move over time?
3 commentaires
Stephen23
le 15 Nov 2019
im trying to make a code to show the movements of particles on a graph. whenever the graph is plotted the particles dont move. How do I make the plots move over time?
Réponse acceptée
Walter Roberson
le 3 Mai 2018
You need to add a drawnow() or pause() after the scatter.
It is recommended that instead of using scatter() inside the loop, that instead you scatter() once before the loop and record the handle that is returned. Then inside the loop, set() the XData and YData properties of the handle to reflect the new locations: that is more efficient than rebuilding the axes each time the way you are now.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!