Matlab movie problems

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

Réponses (1)

Daniel Shub
Daniel Shub le 6 Août 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

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Question posée :

le 6 Août 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by