Changeset 402 for trunk/src/read_get_field.m
- Timestamp:
- Apr 29, 2012, 11:29:24 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_get_field.m
r231 r402 450 450 end 451 451 452 453 454 452 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 455 453 %% get the input field 456 454 inputfield=get(handles.inputfile,'String'); 457 455 if 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 459 457 else % subfield stored in memory 460 458 SubField.ListGlobalAttribute={}; … … 639 637 VarNameU=Field.ListVarName{VarIndexU}; % name of u component variable 640 638 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 642 641 SingleCellU={}; 643 642 if numel(npxy) < numel(DimCellU)
Note: See TracChangeset
for help on using the changeset viewer.