- Timestamp:
- Apr 27, 2014, 11:18:06 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r752 r754 988 988 Field=get(handles.get_field,'UserData'); 989 989 index=get(handles.SwitchVarIndexTime,'Value'); 990 MenuIndex=get(handles.TimeName,'Value'); 991 string=get(handles.TimeName,'String'); 992 TimeName=string{MenuIndex}; 990 993 switch index 991 994 case 1 … … 994 997 case 2 995 998 set(handles.num_TimeDimension,'String','') 996 attr_index= strcmpi(TimeUnit,Field.ListGlobalAttribute);999 attr_index=find(strcmpi([TimeName 'Unit'],Field.ListGlobalAttribute));% look for time unit 997 1000 if ~isempty(attr_index) 998 1001 AttrName=Field.ListGlobalAttribute{attr_index}; … … 1000 1003 end 1001 1004 case {3 ,4} 1002 MenuIndex=get(handles.TimeName,'Value');1003 string=get(handles.TimeName,'String');1004 1005 if index==3 % TimeName is used to chose a variable 1005 VarName=string{MenuIndex}; 1006 VarIndex=name2index(VarName,Field.ListVarName); 1006 VarIndex=name2index(TimeName,Field.ListVarName); 1007 1007 DimName=Field.VarDimName{VarIndex}; 1008 1008 DimIndex=name2index(DimName,Field.ListDimName); … … 1014 1014 end 1015 1015 set(handles.TimeUnit,'String',unit) 1016 update_field(handles, VarName)1016 update_field(handles,TimeName) 1017 1017 elseif index==4% TimeName is used to chose a dimension 1018 1018 DimName=string{MenuIndex}; … … 1021 1021 set(handles.num_TimeDimension,'String',num2str(DimValue)) 1022 1022 set(handles.TimeUnit,'String','index') 1023 1024 1023 end 1025 1024 end -
trunk/src/get_file_series.m
r643 r754 23 23 %ref_j=[]; 24 24 first_j=[];last_j=[];incr_j=1;%default 25 if isfield(Param.IndexRange,'first_j') 25 if isfield(Param.IndexRange,'first_j')&& isfield(Param.IndexRange,'last_j') 26 26 first_j=Param.IndexRange.first_j; 27 last_j=Param.IndexRange.last_j; 28 end 29 if isfield(Param.IndexRange,'incr_j') 27 30 incr_j=Param.IndexRange.incr_j; 28 last_j=Param.IndexRange.last_j;29 31 end 30 32
Note: See TracChangeset
for help on using the changeset viewer.