Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How do I convert a list of Matlab Figures into a movie

Subject: How do I convert a list of Matlab Figures into a movie

From: anoop Sivasankaran

Date: 13 Jul, 2010 14:50:21

Message: 1 of 2

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

Subject: How do I convert a list of Matlab Figures into a movie

From: Steven Lord

Date: 13 Jul, 2010 15:37:47

Message: 2 of 2


"anoop Sivasankaran" <anooppgd@gmail.com> wrote in message
news:i1hufd$hkt$1@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@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

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us