Changeset 1485
- Timestamp:
- 07/31/09 16:42:14 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/plot/plot_transient_movie.m
r1095 r1485 9 9 subplot(width,width,i); 10 10 11 if strcmpi(md.type,'2d') 12 choice=input('Which field do you want to plot? (vel/vx/vy/thickness/surface/bed)','s'); 13 if ~strcmp(choice,'vel') & ~strcmp(choice,'vx') & ~strcmp(choice,'vy') & ~strcmp(choice,'thickness') & ~strcmp(choice,'bed') & ~strcmp(choice,'surface') 14 disp('plot_transient_movie error message: input not supported yet, exiting...') 15 return 16 end 11 %xlim 12 if ~isnan(options_structure.transient_movie_field), 13 field=options_structure.transient_movie_field; 17 14 else 18 choice=input('Which field do you want to plot? (vel/vx/vy/vz/thickness/surface/bed/temperature/melting)','s'); 19 if ~strcmp(choice,'vel') & ~strcmp(choice,'vx') & ~strcmp(choice,'vy') & ~strcmp(choice,'vz') & ~strcmp(choice,'temperature') & ~strcmp(choice,'thickness') & ~strcmp(choice,'bed') & ~strcmp(choice,'surface') 20 disp('plot_transient_movie error message: input not supported yet, exiting...') 21 return 22 end 15 error('specify transient_movie_field in options list'); 23 16 end 24 17 … … 28 21 %loop over the time steps 29 22 for i=1:length(md.results.transient) 30 eval(['data=md.results.transient(' num2str(i) ').' num2str( choice) ';']);23 eval(['data=md.results.transient(' num2str(i) ').' num2str(field) ';']); 31 24 32 25 %process data 33 26 [data isongrid]=processdata(md,data,options_structure); 34 titlestring=[ choice' at time ' num2str(md.results.transient(i).time/md.yts) ' year'];27 titlestring=[field ' at time ' num2str(md.results.transient(i).time/md.yts) ' year']; 35 28 plot_unit(x,y,z,elements,data,isongrid,is2d,options_structure) 36 29 apply_options_movie(md,options_structure,titlestring); 37 pause(0.5) 30 31 if ~isnan(options_structure.transient_movie_output), 32 frames(i)=getframe(gcf); 33 else 34 pause(0.5) 35 end 38 36 end 37 38 %output movie if requested. 39 if ~isnan(options_structure.transient_movie_output), 40 filename=options_structure.transient_movie_output; 41 42 %fps 43 if ~isnan(options_structure.transient_movie_fps), 44 fps=options_structure.transient_movie_fps; 45 else 46 fps=5; 47 end 48 %quality 49 if ~isnan(options_structure.transient_movie_quality), 50 quality=options_structure.transient_movie_quality; 51 else 52 quality=75; 53 end 54 movie2avi(frames,filename,'fps',fps,'quality',quality); 55 end 56 39 57 end %function 40 58
Note:
See TracChangeset
for help on using the changeset viewer.