


ANIM_FRAME makes a frame for later conversion into a movie by ANIM_MAKE
name = the base name of the movie
frame_num = the number of the frame being written out

0001 function anim_frame(name,frame_num); 0002 % ANIM_FRAME makes a frame for later conversion into a movie by ANIM_MAKE 0003 % name = the base name of the movie 0004 % frame_num = the number of the frame being written out 0005 % 0006 0007 % This version writes out PCX images, which are 8-bit images using a 0008 % simple no-loss compression scheme 0009 0010 % Rich Signell (rsignell@usgs.gov) adapted from code by Jamie Pringle 0011 0012 global makemovienx makemovieny anim_name 0013 0014 anim_name=name; 0015 0016 % Capture the frame: 0017 0018 [X,map]=getframe(gcf); %Matlab 5.3 syntax 0019 % [X,map]=capture; % pre-Matlab 5.3 syntax 0020 0021 % Write out the image in PCX format: 0022 0023 imwrite(X,map,sprintf('/tmp/%s%3.3i.pcx',name,frame_num),'PCX'); 0024 0025 makemovienx=size(X,2); 0026 makemovieny=size(X,1);