How to center x-axis in animatedline plotting
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Engin Sühan Bilgiç
am 26 Dez. 2021
Kommentiert: Engin Sühan Bilgiç
am 26 Dez. 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 Kommentare
Akzeptierte Antwort
Burhan Burak AKMAN
am 26 Dez. 2021
Bearbeitet: Burhan Burak AKMAN
am 26 Dez. 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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Animation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!