How do I create a video from an animated plot?

조회 수: 61 (최근 30일)
Moein M
Moein M 2020년 6월 11일
댓글: Image Analyst 2020년 8월 18일
I want to create a video of the animated plot generated by this code:
clc
clear
close all
bb = importdata('data.txt');
xx = bb(:,1);
yy = bb(:,2);
plot(xx,yy)
xlabel('Time (Second)');
ylabel('Acceleration (Centimeter/Secon^2)');
curve = animatedline('Color', 'r');
grid off;
for i = 1:length(xx)
addpoints(curve,xx(i), yy(i));
drawnow limitrate
pause(0.0005)
end
Any thoughts on how to do that?
Thank you.
  댓글 수: 1
Image Analyst
Image Analyst 2020년 8월 18일
Not sure what your edit was (maybe you removed 'data.txt' attachment???), but the answers below should still work fine. Why don't you try and accept my Answer below?

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

채택된 답변

Image Analyst
Image Analyst 2020년 6월 13일
Here's a demo where I made a movie from a surf() plot where the plot changed at each frame.

추가 답변 (1개)

KSSV
KSSV 2020년 6월 11일

카테고리

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