making movies with avifile and addframe produces black screen in half of the movie

1 次查看(过去 30 天)
Hello there!
I would very much appreciate some help with a movie I am making from my simulation results. Generally, the code is like this:
clear all; clc;
aviobj=avifile('movie.avi','fps',5);
img = figure();
ax = axes('parent',img);
hold(ax,'all');
set(ax,'XLim',[0 300]);
set(ax,'YLim',[0 300]);
for i=1:288
pl = plot(i,i,'parent',ax);
aviobj = addframe(aviobj,getframe(img));
delete(pl);
end
aviobj = close(aviobj);
close all;
Obviously, the pictures in it are more complex but this is the principle.
This works well, except: When looking at the movie, the second half of the movie is just a black screen.
What could be the problem here?
Thank you very much for your help!
Anna

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by