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;
img = figure();
ax = axes('parent',img);
pl = plot(i,i,'parent',ax);
aviobj = addframe(aviobj,getframe(img));
aviobj = close(aviobj);
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!