How do I save a video with subplot?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone!
I have a sequence of frames on which I have plotted two arrays in order to show the behaviour of a scenario using the subplot function. I used the videowriter function to save only the video, and so far I had no problems. Now I'd like to save a video with the two arrays displayed with subplot but it doesn' t seem to work. Is there some other function that I can use to show all my plots in the video? It seems that I may use the getframe function but so far i didn't understand how to deal with it. any other suggestions?
0 comentarios
Respuestas (1)
Prashant Arora
el 8 de Mzo. de 2017
Hi Andrea,
You can refer to the code below to get started on getframe and video writer.
h = figure;
subplot(2,1,2);
plot(1:10);
subplot(2,1,1);
plot(5:15);
F = getframe(h);
v = VideoWriter('myFile.avi');
open(v);
writeVideo(v,F.cdata)
close(v);
0 comentarios
Ver también
Categorías
Más información sobre Audio and Video Data 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!