Changeset 2628
- Timestamp:
- 11/09/09 11:58:42 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Model/loadmodel.m
r2364 r2628 8 8 % loadmodel path 9 9 10 % some checks10 %check nargout 11 11 if nargout>1, 12 12 error('loadmodel usage error: md=loadmodel(path)'); 13 13 end 14 %check existence 14 15 if ~exist(path) 15 16 error(['loadmodel error message: file ' path ' does not exist']); 16 17 end 18 %check that the file is readable 19 [stat,mess]=fileattrib('larsenc8.model'); 20 if( stat==0 | mess.UserRead~=1), 21 error(['loadmodel error message: file ' path ' is not readable (permission dinied).']); 22 end 23 %check number of variables 17 24 if length(whos('-file',path))>1, 18 25 error(['loadmodel error message: file ' path ' contains several variables. Only one model should be present.']);
Note:
See TracChangeset
for help on using the changeset viewer.