Changeset 1083 for trunk/src/get_field.m
- Timestamp:
- Jun 18, 2020, 11:16:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r1082 r1083 172 172 173 173 %% select the Time attribute from input 174 if Field.MaxDim > =2174 if Field.MaxDim >2 175 175 variable_index=find(strcmp('variable',ListSwitchVarIndexTime),1); 176 176 set(handles.SwitchVarIndexTime,'Value',variable_index); 177 177 else 178 if isfield(ParamIn,'TimeAttrName') 178 if isfield(ParamIn,'TimeAttrName')&& ~isempty(ParamIn.TimeAttrName) 179 179 time_index=find(strcmp(ParamIn.TimeAttrName,Field.Display.ListGlobalAttribute),1); 180 180 else 181 time_index=find( ~cellfun('isempty',regexp(Field.Display.ListGlobalAttribute,'Time')),1);% look for global attribute containing name 'Time'181 time_index=find(strcmp('Time',Field.Display.ListGlobalAttribute));% look for global attribute containing name 'Time' 182 182 end 183 183 if isempty(time_index) … … 796 796 set(handles.SwitchVarIndexTime,'Value',3)% the last dim must be considered as time 797 797 end 798 if numel(var_component)<2 798 if numel(var_component)<2 %unstructured coordinates excluded 799 799 if numel(find(test_coord))<2 800 800 ListCoord={''}; … … 828 828 end 829 829 if numel(find(coord_val))<2 830 %coord_val=[numel(var_component)+2 numel(var_component)+1];831 830 coord_val=[1 2 3]; 832 831 end 833 set(handles.Coord_x,'Value',coord_val( 1))834 set(handles.Coord_y,'Value',coord_val( 2))832 set(handles.Coord_x,'Value',coord_val(end)) 833 set(handles.Coord_y,'Value',coord_val(end-1)) 835 834 if numel(coord_val)>=3 836 set(handles.Coord_z,'Value',coord_val( 3))835 set(handles.Coord_z,'Value',coord_val(end-2)) 837 836 end 838 837 end
Note: See TracChangeset
for help on using the changeset viewer.