How to center x-axis in animatedline plotting

1 回表示 (過去 30 日間)
Engin Sühan Bilgiç
Engin Sühan Bilgiç 2021 年 12 月 26 日
コメント済み: Engin Sühan Bilgiç 2021 年 12 月 26 日
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

採用された回答

Burhan Burak AKMAN
Burhan Burak AKMAN 2021 年 12 月 26 日
編集済み: Burhan Burak AKMAN 2021 年 12 月 26 日
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
  1 件のコメント
Engin Sühan Bilgiç
Engin Sühan Bilgiç 2021 年 12 月 26 日
It solved it.
Thank you so much for your answer 👍

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by