Changeset 12649


Ignore:
Timestamp:
07/18/12 10:26:20 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixed extension that might or might not be provided

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/utils/Model/loadmodel.m

    r10184 r12649  
    1212        error('loadmodel usage error: md=loadmodel(path)');
    1313end
     14
    1415%check existence
    15 if ~exist(path)
     16if exist(path,'file')
     17        %do nothing
     18elseif exist([path '.mat'],'file')
     19        %add extension
     20        path = [path '.mat'];
     21else
    1622        error(['loadmodel error message: file ' path ' does not exist']);
    1723end
Note: See TracChangeset for help on using the changeset viewer.