From: anoop Sivasankaran on
I have a set of 20 fig files in a directory (1.fig, 2.fig etc). I would like to combine this 20 files and present it as a movie. The problem is I don't know how to read a fig file.

For example

for i=1:1:20
a = SHOULD READ MY FIG FILES %% similar to imread(strcat(int2str(i),'.bmp'));% should read my fig files 1.fig, 2.fig,...20.fig,
M = im2frame(a);
aviobj = addframe(aviobj,M);
fprintf('adding frame = %i\n', i);
end

disp('Closing movie file...')
aviobj = close(aviobj);

disp('Playing movie file...')
implay('a.avi');


Any help would be greatly appreciated
From: Steven Lord on

"anoop Sivasankaran" <anooppgd(a)gmail.com> wrote in message
news:i1hufd$hkt$1(a)fred.mathworks.com...
>I have a set of 20 fig files in a directory (1.fig, 2.fig etc). I would
>like to combine this 20 files and present it as a movie. The problem is I
>don't know how to read a fig file.
>
> For example
>
> for i=1:1:20 a = SHOULD READ MY FIG FILES %% similar to
> imread(strcat(int2str(i),'.bmp'));% should read my fig files 1.fig,
> 2.fig,...20.fig,

See Q4.12 in the newsgroup FAQ.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com