Matlab movie problems
Show older comments
I have just copied the following code from the matlab instruction manual:
figure(1)
numframes=16;
A=moviein(numframes); % create the movie matrix
set(gca,'NextPlot','replacechildren')
axis equal % fix the axes
for i=1:numframes
plot(fft(eye(i+16)));
A(:,i)=getframe;
end
movie(A,10,3)
save movie.mat A
mpgwrite(A,jet,'movie.mpg');
unix('mpeg_play movie.mpg') % Play the MPEG movie
I get the following error:
??? Undefined function or method
'mpgwrite' for input arguments of type
'struct'.
Error in ==> movie3 at 12
mpgwrite(A,jet,'movie.mpg'); % Convert
the movie to MPEG format
I am using a Mac OS C 10.6.6 Intel version. Thanks
Answers (1)
Daniel Shub
on 6 Aug 2011
0 votes
Can you provide a link to the "instruction manual." There is a FEX submission mpgwrite, but I cannot find any documentation on an official Mathworks mpgwrite. You might want to try VideoWriter
Categories
Find more on Audio and Video Data 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!