Changeset 17259


Ignore:
Timestamp:
02/12/14 10:32:44 (11 years ago)
Author:
Mathieu Morlighem
Message:

NEW: allow *.mat extension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/organizer.m

    r15786 r17259  
    9797                        %figure out if the model is there
    9898                        if exist(path,'file'),
    99                                 struc=load(path,'-mat');
    100                                 name=char(fieldnames(struc));
    101                                 md=struc.(name);
    102                                 if nargout,
    103                                         varargout{1}=md;
    104                                 end
     99                                path=path;
     100                        elseif exist([path '.mat'],'file'),
     101                                path=[path '.mat'];
    105102                        else
    106103                                error(['Could not find ' path ]);
     104                        end
     105
     106                        struc=load(path,'-mat');
     107                        name=char(fieldnames(struc));
     108                        md=struc.(name);
     109                        if nargout,
     110                                varargout{1}=md;
    107111                        end
    108112                end%}}}
Note: See TracChangeset for help on using the changeset viewer.