How to center x-axis in animatedline plotting
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Engin Sühan Bilgiç
il 26 Dic 2021
Commentato: Engin Sühan Bilgiç
il 26 Dic 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 Commenti
Risposta accettata
Burhan Burak AKMAN
il 26 Dic 2021
Modificato: Burhan Burak AKMAN
il 26 Dic 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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Animation in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!