Changeset 2224 for issm/trunk
- Timestamp:
- 09/14/09 07:14:16 (16 years ago)
- File:
- 
      - 1 edited
 
 - 
          
  issm/trunk/src/m/utils/Model/loadmodel.m (modified) (2 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      issm/trunk/src/m/utils/Model/loadmodel.mr1323 r2224 13 13 14 14 try, 15 s=load(path,'-mat'); 15 struc=load(path,'-mat'); 16 16 17 %get name of model variable 17 fieldname=char(fieldnames(s ));18 md=eval(['s .' fieldname]);18 fieldname=char(fieldnames(struc)); 19 md=eval(['struc.' fieldname]); 19 20 if ~strcmpi(class(md),'model'), 20 21 md2=model; … … 28 29 assignin('caller',fieldname,md); 29 30 end 30 catch 31 catch me 32 disp(getReport(me)) 31 33 error(['could not load model ' path]); 32 34 end 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  ![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)
