Changeset 13240


Ignore:
Timestamp:
09/04/12 14:52:10 (13 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added constructor to materials, so that it can load old structures

File:
1 edited

Legend:

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

    r13131 r13240  
    2626                                case 0
    2727                                        obj=setdefaultparameters(obj);
     28                                case 1
     29                                        inputstruct=varargin{1};
     30                                        list = properties('matice');
     31                                        list2 = fieldnames(inputstruct);
     32                                        for i=list1
     33                                                fieldname = list1{i};
     34                                                if ismember(fieldname,list2),
     35                                                        obj.(filename) = inputstruct.(filename);
     36                                                end
     37                                        end
    2838                                otherwise
    2939                                        error('constructor not supported');
Note: See TracChangeset for help on using the changeset viewer.