필터 지우기
필터 지우기

How to interactively see the progress of a line which is being drawn in Matlab?

조회 수: 3 (최근 30일)
yashvin
yashvin 2015년 10월 2일
댓글: yashvin 2015년 10월 2일
Hi
I want to draw a line in a plot in MATLAB such as I see it increasing/decreasing. Normally, we just use
plot(rand(5))
Which leads to a final image. I want to see the progress of the graph as it is being plotted!

답변 (1개)

Steven Lord
Steven Lord 2015년 10월 2일
See COMET or ANIMATEDLINE.
  댓글 수: 1
yashvin
yashvin 2015년 10월 2일
Hi Steven
h = animatedline;
DateStrings = {'2014-05-26T13:30-05:00';'2014-08-26T13:30-04:00';'2014-09-26T13:30Z'}
x = datetime(DateStrings,'InputFormat','uuuu-MM-dd''T''HH:mmXXX','TimeZone','UTC')'
y=[1 2 3]
for k = 1:length(x)
addpoints(h,x(k),y(k))
drawnow
end
I tried plotting it using Animated line. For x which are datetime values, how can i proceed?
There is an error! Thanks Yashvin

댓글을 달려면 로그인하십시오.

카테고리

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