Used getframe command to create video, but get empty file
Show older comments
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);
Accepted Answer
More Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!