Changeset 180 for trunk/src/calc_field.m


Ignore:
Timestamp:
Jan 18, 2011, 10:50:40 PM (13 years ago)
Author:
sommeria
Message:

rationalisation of uvmat, introduction of the new function read_field, links with get_field, several bug repairs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/calc_field.m

    r156 r180  
    6767    units_cell={};
    6868    for ilist=1:length(FieldName)
    69         [VarName,Value,Role,units]=feval(FieldName{ilist},DataIn);%calculate field with appropriate function named FieldName{ilist}
    70         ListVarName=[ListVarName VarName];
    71         ValueList=[ValueList Value];
    72         RoleList=[RoleList Role];
    73         units_cell=[units_cell units];
     69        if ~isempty(FieldName{ilist})
     70            [VarName,Value,Role,units]=feval(FieldName{ilist},DataIn);%calculate field with appropriate function named FieldName{ilist}
     71            ListVarName=[ListVarName VarName];
     72            ValueList=[ValueList Value];
     73            RoleList=[RoleList Role];
     74            units_cell=[units_cell units];
     75        end
    7476    end
    7577    %erase previous data (except coordinates)
Note: See TracChangeset for help on using the changeset viewer.