필터 지우기
필터 지우기

Make a dynamic line plot

조회 수: 33 (최근 30일)
H-H
H-H 2014년 7월 25일
답변: Parisa Sadeghi 2017년 7월 26일
I have a vector Y and X. I want to make a dynamic 2D line plot that is updated as a new point is added to the X and Y.
X=[1 2 3];
Y=[5 6 7];
for i=0:20
X=[X, i];
Y=[Y,i*2];
?? how to make dynamic Y vs X line plot?
end

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 7월 25일
close
X=[1 2 3];
Y=[5 6 7];
plot(X,Y)
hold on
for i=4:20
X=[X, i];
Y=[Y,i*2];
plot(i,i*2,'*')
pause(1)
end

Parisa Sadeghi
Parisa Sadeghi 2017년 7월 26일
Can the dynamic plot be embedded in a powerpoint presentation in the form of a movie?
Thanks

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by