Ignore:
Timestamp:
Apr 29, 2012, 11:29:24 AM (12 years ago)
Author:
sommeria
Message:

bugs corrected and improved procedure for object projection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_get_field.m

    r231 r402  
    450450end
    451451
    452 
    453 
    454452%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    455453%% get the input field
    456454inputfield=get(handles.inputfile,'String');
    457455if exist(inputfield,'file')% read the input data corresponding to the list of selected varaibles
    458     SubField=nc2struct(inputfield,ListVarName);
     456    SubField=nc2struct(inputfield,ListVarName);%read the list of variables ListVarName from the input file
    459457else  % subfield stored in memory
    460458    SubField.ListGlobalAttribute={};
     
    639637    VarNameU=Field.ListVarName{VarIndexU}; % name of u component variable
    640638    DimCellU=Field.VarDimName{VarIndexU}; % list of dimensions for u component 
    641     eval(['npxy=size(SubField.' VarNameU ');']) % npxy= dimension values for the u component
     639  % eval(['npxy=size(SubField.' VarNameU ');']) % npxy= dimension values for the u component
     640   npxy=size(SubField.(VarNameU)); % npxy= dimension values for the u componen
    642641    SingleCellU={};
    643642    if numel(npxy) < numel(DimCellU)
Note: See TracChangeset for help on using the changeset viewer.