Hej Tolga !
I think, you can save all the figure as images in your code.
saveas(gcf,['./Saved_Figure_',num2str(n),'_position.png'])
Then, read those images and save as movie.
clear all; close all; clc
for n=1:54
eval(['x=imread(''./Saved_Figure_',num2str(n),'_position.png'');'])
M(n)=im2frame(x);
end
[h, w, p] = size(M(1).cdata); % use 1st frame to get dimension
hf = figure;
% resize figure based on frame's w x h, and place at (150, 150)
set(hf, 'position', [120 120 w h]);
axis off
% tell movie command to place frames at bottom left
movie(hf,M,1,3,[0 0 0 0]);
movie2avi(M,'filename','fps',3)
As to what these commands do, better read the MATLAB help docs.
Good Luck.
Cheers,
Tilak
2010/8/16 Tolga kurt
> Hi folks,
>
> I got stuck in this problem: I have a figure and throughout my script, the
> figure is being changed. How can I capture all changes in the figure
(sample
> it) and make them an animation (gif or avi formatted), as if the Matlab
> function "getframe" works continuously?
>
> Cheers,
>
> Tolga
>
>
>