|
"Jeff " <spREMOVEHITSjeffAT@SIGNoptonline.net> wrote in message <hvhit5$rvl$1@fred.mathworks.com>...
> So I have a matrix which represents the position of some masses over time. Each row is a timestep, each column is a mass. I use a loop to display one row (timestep) at a time and I get a little movie of the masses moving up and down (I probably need them to go left and right, but that's a subject for another post). I seem to recall a simple way to save that as a movie which any recorder can play, but can't remember how to do it. How can I save it as a movie?
>
> Thanks
>
> Here is the code (only the for, plot, and end statements are important):
>
> for ii=1:24129
> plot(s1po(ii,:),'o');
> ax=axis;
> txt=sprintf('%d',ii);
> text(0,ax(4),txt,'BackgroundColor','white','EdgeColor','red', ...
> 'VerticalAlignment','top');
> drawnow;
> end
In addition to Tideman's fine suggestions, if you have R2010a, you can look at
signalblks.MultimediaFileWriter
This object will write an AVI file on all platforms, and on Windows will write an AVI or WMV file. It is essentially a Matlab implementation of the Simulink "To Multimedia File" block.
Wayne
|