ggplot
[wrf-fire-matlab.git] / detection / mov2mpeg.m
blob6ebef18d76d87fdc1707962b90a3cb5dac2b5f18
1 function mov2mpeg(M,file,fps)
2 % mov2mpeg(M,file)
3 % mov2mpeg(M,file,fps)
4 fprintf('Writing %i frames as movie file %s\n',length(M),file)
5 v=VideoWriter(file,'MPEG-4');
6 if ~exist('fps','var')
7     fps=8
8 end
9 v.FrameRate=fps;
10 v.Quality=100;M
12 open(v);
13 axis off
14 set(gca,'nextplot','replacechildren');
15 for iframe=1:length(M),
16     writeVideo(v,M(iframe));
17 end
18 close(v)