How to center x-axis in animatedline plotting

조회 수: 5 (최근 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 CenterFile Exchange에서 Animation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by