Matlab has the following guide to making a movie in avi format. My goal is to be able to play the video in my presentation through powerpoint.
nFrames = 20;
% Preallocate movie structure.
mov(1:nFrames) = struct('cdata', [],...
'colormap', []);
% Create movie.
Z = peaks; surf(Z);
axis tight
set(gca,'nextplot','replacechildren');
for k = 1:nFrames
surf(sin(2*pi*k/20)*Z,Z)
mov(k) = getframe(gcf);
end
% Create AVI file.
movie2avi(mov, 'myPeaks.avi', 'compression', 'None');
I understand this example and that I should have no compression to load into PowerPoint. However I dont understand how to properly preallocate my memory using struct.