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
回答(1 个)
Daniel Shub
2011-8-6
0 个投票
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
类别
在 帮助中心 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!