Changeset 18301 for issm/trunk/src/m/plot/plot_transient_movie.m
- Timestamp:
- 07/30/14 14:22:43 (11 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/plot/plot_transient_movie.m
r15396 r18301 13 13 field=getfieldvalue(options,'transient_movie_field'); 14 14 else 15 error('specify transient_movie_field in options list'); 15 disp('List of available fields:'); 16 F=fields(md.results.TransientSolution(1)); 17 num = []; 18 for i=1:numel(F), 19 if ~strcmp(F{i},'time') & ... 20 ~strcmp(F{i},'step') & ... 21 ~strcmp(F{i},'errlog') & ... 22 ~strcmp(F{i},'outlog') & ... 23 ~strcmp(F{i},'MaxIterationConvergenceFlag') & ... 24 ~strcmp(F{i},'SolutionType'), 25 disp([' ' num2str(i) ': ' F{i} ]); 26 num = [num i]; 27 end 28 end 29 choice=input(['please enter the field number? (between ' num2str(min(num)) ' and ' num2str(max(num)) ') ']); 30 field = F{choice}; 16 31 end 17 32 … … 24 39 steps=1:length(results); 25 40 end 26 results=md.results.TransientSolution; 41 42 %calculate caxis 43 if ~exist(options,'caxis'), 44 range = [Inf -Inf]; 45 for i=steps 46 [data datatype]=processdata(md,results(i).(field),options); 47 range(1) = min(range(1),min(data)); 48 range(2) = max(range(2),max(data)); 49 end 50 options=addfielddefault(options,'caxis',range); 51 end 52 53 %display movie 27 54 nstep=1; 55 deltat = getfieldvalue(options,'pause',.5); 28 56 for i=steps 29 57 … … 33 61 [data datatype]=processdata(md,results(i).(field),options); 34 62 63 clf; 35 64 titlestring=[field ' at time ' num2str(results(i).time/md.constants.yts) ' year']; 36 65 plot_unit(x,y,z,elements,data,is2d,isplanet,datatype,options) … … 49 78 end 50 79 else 51 pause( 0.1)80 pause(deltat) 52 81 end 53 82 nstep=nstep+1;
Note:
See TracChangeset
for help on using the changeset viewer.