From: Adnan Abdulally on
I want to make a movie out of matrix information i have. Here is the gist of what i want to do

I have a for loop, each for loop creates a 512x512 matrix that represents a 512x512 picture. This for loop will, lets say, go for 300 iterations to create 300 picture frames. I want to turn these 300 frames into a 10 second movie at 30 frames per second. The information in the matrices are intensities stored for each pixel. For instance, if i did imagesc(matrix) and i chose the colormap to be jet, that would generally be what the picture of each frame would look like.

What i want matlab to do is somehow output a movie file (avi, mpeg, whatever) that is 10 seconds at 30 frames per second of my information. Ideally i would only like 1 512x512 matrix/picture to be stored in memory at a time. Can someone help me on how to make this video?

Thanks,

Adnan
From: Gary on
"Adnan Abdulally" <adnan.abdulally(a)tsc.com> wrote in message <hifn50$ai3$1(a)fred.mathworks.com>...
> I want to make a movie out of matrix information i have. Here is the gist of what i want to do
>
> I have a for loop, each for loop creates a 512x512 matrix that represents a 512x512 picture. This for loop will, lets say, go for 300 iterations to create 300 picture frames. I want to turn these 300 frames into a 10 second movie at 30 frames per second. The information in the matrices are intensities stored for each pixel. For instance, if i did imagesc(matrix) and i chose the colormap to be jet, that would generally be what the picture of each frame would look like.
>
> What i want matlab to do is somehow output a movie file (avi, mpeg, whatever) that is 10 seconds at 30 frames per second of my information. Ideally i would only like 1 512x512 matrix/picture to be stored in memory at a time. Can someone help me on how to make this video?
>
> Thanks,
>
> Adnan

see Matlab help for im2frame, getframe, or movie
From: Steven Lord on

"Adnan Abdulally" <adnan.abdulally(a)tsc.com> wrote in message
news:hifn50$ai3$1(a)fred.mathworks.com...
>I want to make a movie out of matrix information i have. Here is the gist
>of what i want to do
>
> I have a for loop, each for loop creates a 512x512 matrix that represents
> a 512x512 picture. This for loop will, lets say, go for 300 iterations to
> create 300 picture frames. I want to turn these 300 frames into a 10
> second movie at 30 frames per second. The information in the matrices are
> intensities stored for each pixel. For instance, if i did imagesc(matrix)
> and i chose the colormap to be jet, that would generally be what the
> picture of each frame would look like.
> What i want matlab to do is somehow output a movie file (avi, mpeg,
> whatever) that is 10 seconds at 30 frames per second of my information.
> Ideally i would only like 1 512x512 matrix/picture to be stored in memory
> at a time. Can someone help me on how to make this video?

Look at the AVIFILE function.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ