From my previous question, I have tried to understand how to create frames or to play an animation in Matlab. I have clarified everything, but now I'm trying to figure out how to play it infinitely. For example let us consider two snippets of code. The first from my previous question
x = 0:0.1:10;
FRAMES = 32; %// Total number of frames
for k = 1:FRAMES
ph = k * 2 * pi / FRAMES; %// Accumulate phase
plot(x, sin(x + ph)) %// Generate plot
grid, axis equal
M(k) = getframe; %// Capture frame
end
%// Play movie 10 times
movie(M, 10)
This plays the movie 10 times. But let us consider a second case of what I am trying to do
for k = 1:16
plot(fft(eye(k+16)))
axis equal
M(k) = getframe;
end
while 1
movie(M,10)
end
It starts an animation and after a few seconds it stops. I have put movei(M,10)
into
while 1
end
because I wanted to play it infinitely or create an infinite loop. But it does not do its job properly. So please advice me. Is it possible for Matlab to create infinite movies?