Changeset 21769
- Timestamp:
- 06/28/17 09:31:22 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/miscellaneous/transientrestart.m
r20519 r21769 1 function md = transientrestart(md )1 function md = transientrestart(md,step) 2 2 %TRANSIENTRESTART - reinitialize model from last transient step 3 3 % 4 4 % Usage: 5 5 % md = transientrestart(md) 6 % md = transientrestart(md,step) 7 % 8 % By default, transientrestart will use the last step provided in md.results.TransientSolution 6 9 7 10 %Get result and save it again 8 results = md.results.TransientSolution(end); 11 if nargin==1, 12 step = numel(md.results.TransientSolution(end)); 13 end 14 if step<1, 15 error('step needs to be >0'); 16 elseif step>numel(md.results.TransientSolution) 17 error(['md.results.TransientSolution has only ' num2str(numel(md.results.TransientSolution)) ' steps']); 18 end 19 results = md.results.TransientSolution(step); 9 20 10 21 newname = ['TransientSolution' num2str(numel(fields(md.results))+1)];
Note:
See TracChangeset
for help on using the changeset viewer.