How to center x-axis in animatedline plotting
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Engin Sühan Bilgiç
le 26 Déc 2021
Commenté : Engin Sühan Bilgiç
le 26 Déc 2021
I'm attaching the video here. What I want is that to follow the newly added marks as its x axis throughout the animation process.
https://www.youtube.com/watch?v=2Bejgg1FC7g
0 commentaires
Réponse acceptée
Burhan Burak AKMAN
le 26 Déc 2021
Modifié(e) : Burhan Burak AKMAN
le 26 Déc 2021
You can use this code.
a=animatedline();
xlabel("Distance[m]")
ylabel("Amplitude[V]")
xlim([-250,250])
ylim([-2,2])
for x=linspace(0,500,100)
y=sin(x/50);
addpoints(a,x,y);
xlim([x-250,x+250])
drawnow
end
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Animation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!