Used getframe command to create video, but get empty file
Afficher commentaires plus anciens
Hi,
I am using getframe command to create a video, but got an empty file in the end.
Could anyone help me with this?
Thanks! Ruming
Here attached is the matlab script that I used:
for j = 1:a_w
for i = 1:b_w
array_2_with_diff(1, i) = Data_with_diff(j, i);
end
p = scatter(array_x_axis(1,:),array_2_with_diff(1,:),'o');
h = plot(array_x_axis(1,:),array_2_with_diff(1,:),'g');
drawnow;
F(i) = getframe(gcf);
pause(0.01);
delete(p);
delete(h);
end
video = VideoWriter('With_diff_movie.avi', 'Uncompressed AVI');
video.FrameRate = 60;
open(video);
writeVideo(video, F);
close(video);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Audio and Video Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!