Changeset 517 for trunk/src/nc2struct.m


Ignore:
Timestamp:
Aug 17, 2012, 11:47:16 PM (9 years ago)
Author:
sommeria
Message:

various bugs corrected. get_field now used in a passive way from uvmat: variable names are transferred from get_field to uvmat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/nc2struct.m

    r421 r517  
    145145        Data.ListVarName=ListVarNameNetcdf;
    146146    else   %select input variables, if requested by the input ListVarName
     147        ind_remove=[];
     148        for ivar=1:numel(ListVarName) % check redondancy
     149            if ~isempty(find(strcmp(ListVarName{ivar},ListVarName(1:ivar-1))))
     150                ind_remove=[ind_remove ivar];
     151            end
     152        end
     153        if ~isempty(ind_remove)
     154            ListVarName(ind_remove)=[];
     155        end           
    147156        sizvar=size(ListVarName);
    148157        testmulti=(sizvar(1)>1);%test for multiple choice of variable ranked by order of priority
Note: See TracChangeset for help on using the changeset viewer.