I seem to be having an error using movie2avi (even using the example shown in Matlab Help) What could be the issue?
Show older comments
I am using matlab R2008a. I am attempting to run the following code from the movie2avi example. When running, the Figure changes as I would expect the movie to. When I type movie(mov) Figure 1 seems to zoom in but freeze on the first figure in the movie. Also when I view the .avi file created, all that is shown is a short wide gray bar that isn't changing. Could my system not have the capability to create the avi file?
scrsz = get(0,'ScreenSize') nFrames = 20;
% Preallocate movie structure. mov(1:nFrames) = struct('cdata', [],... 'colormap', []);
% Create movie. Z = peaks; surf(Z); axis tight manual set(gcf,'position',[1 35 scrsz(3)/1.2 scrsz(4)/1.2],'color','white') set(gca,'nextplot','replacechildren'); for k = 1:nFrames surf(sin(2*pi*k/20)*Z,Z) mov(k) = getframe(gcf); pause(0.05) end
% Create AVI file. movie2avi(mov, 'myPeaks.avi', 'compression', 'None','fps',5);
Accepted Answer
More Answers (0)
Categories
Find more on Specifying Target for Graphics Output 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!