clear n = 200; % number of images to run rerun = 3; % number of times to run movie lisa % This reads lisa.m has DATA = [ ... ] [nimages nvalues] = size(DATA) for i=1:n V(i,:) = DATA(i,:); for j=1:13 xmatrix(i,j) = V(i,4+3*(j-1)); ymatrix(i,j) = V(i,3+3*(j-1)); zmatrix(i,j) = V(i,2+3*(j-1)); end end xmax = ceil(max(max(xmatrix))+5); ymax = ceil(max(max(ymatrix))+5); zmax = ceil(max(max(zmatrix))+5); xmin = floor(min(min(xmatrix))-5); ymin = floor(min(min(ymatrix))-5); zmin = floor(min(min(zmatrix))); gb = [xmin xmax ymin ymax zmin zmax]; % graph bounds % find max x,y,z set this as axis mins % find min x,y,z set this as axis maxs % Get the first crystal image on the screen % then to ann(V) which connects the dots tempt = DATA(1,1); elapsedtime = 0; for i=1:n, V = DATA(i,:); elapsedtime = V(1) - tempt + elapsedtime tempt = V(1); i ann(V,gb); Pic(i) = getframe(gcf); end disp('Finished building Pic') disp('Press any key to show movie') movie2avi(Pic,'c:\lisa.avi') %pause % clf; % axes('Position',[0 0 1 1]); % movie(Pic,rerun)