Changeset 404 for trunk/src/nc2struct.m


Ignore:
Timestamp:
Apr 30, 2012, 6:46:45 PM (9 years ago)
Author:
sommeria
Message:

various bugs corrected. nc2struct_toolbox suppressed (correspond to obsolete versions of Matlab)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/nc2struct.m

    r236 r404  
    1313%                    .VarDimName: list of dimension names for each element of .ListVarName (cell array of string cells)                         
    1414%                    .Var1, .Var2....: variables (Matlab arrays) with names listed in .ListVarName
    15 %                    .ListDimName=list of dimension (added information, not requested for field description)
    16 %                    .DimValue= vlalues of dimensions (added information, not requested for field description)
     15%                  ListDimName=list of dimension (added information, not requested for field description)
     16%                  DimValue= vlalues of dimensions (added information, not requested for field description)
    1717%  var_detect: vector with same length as the cell array ListVarName, = 1 for each detected variable and 0 else.
    1818%            var_detect=[] in the absence of input cell array
     
    108108        try
    109109            if ischar(valuestr) %& length(valuestr)<200 & double(valuestr)<=122 & double(valuestr)>=48 %usual characters
    110                % valuestr=regexprep(valuestr,{'\\','\/','\.','\-',' '},{'_','_','_','_','_'})%remove  '\','.' or '-' if exists
    111110                eval(['Data.' keystr '=''' valuestr ''';'])
    112 %             elseif isempty(valuestr)
    113 %                 eval(['Data.' keystr '=[];'])
    114111            elseif isnumeric(valuestr)
    115112                eval(['Data.' keystr '=valuestr;'])
     
    207204    if ~isempty(var_index)     
    208205        dim_index=find(flag_used);%list of netcdf dimensions indices corresponding to used dimensions
    209         Data.ListDimName=ListDimNameNetcdf(dim_index);
    210         Data.DimValue=dim_value(dim_index);
     206        ListDimName=ListDimNameNetcdf(dim_index);
     207        DimValue=dim_value(dim_index);
    211208    end
    212209   
Note: See TracChangeset for help on using the changeset viewer.