How do I create a video from an animated plot?
61 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Moein M
el 11 de Jun. de 2020
Comentada: Image Analyst
el 18 de Ag. de 2020
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 comentario
Image Analyst
el 18 de Ag. de 2020
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?
Respuesta aceptada
Image Analyst
el 13 de Jun. de 2020
Here's a demo where I made a movie from a surf() plot where the plot changed at each frame.
Más respuestas (1)
Ver también
Categorías
Más información sobre Animation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!