Changeset 586 for trunk/src/get_field.m
- Timestamp:
- Mar 13, 2013, 9:12:09 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r582 r586 406 406 set(handles.CheckScalar,'Value',0) 407 407 set(handles.PanelVectors,'Visible','on') 408 set(handles.XVarName,'Visible','on') 409 set(handles.YVarName,'Visible','on') 410 set(handles.X_title,'Visible','on') 411 set(handles.Y_title,'Visible','on') 408 412 end 409 413 … … 413 417 function scalar_Callback(hObject, eventdata, handles) 414 418 %------------------------------------------------------------------------ 419 Field=get(handles.get_field,'UserData'); 415 420 index=get(handles.scalar,'Value'); 416 421 string=get(handles.scalar,'String'); … … 420 425 %eliminate time 421 426 TimeDimName='';%default 422 if strcmp(get(handles.TimeDimensionMenu,'Visible'),'on') 423 TimeDimList=get(handles.TimeDimensionMenu,'String'); 424 TimeDimIndex=get(handles.TimeDimensionMenu,'Value'); 425 TimeDimName=TimeDimList{TimeDimIndex}; 426 end 427 SwitchVarIndexTime=get(handles.SwitchVarIndexTime,'String'); 428 TimeVarOption=SwitchVarIndexTime{get(handles.SwitchVarIndexTime,'Value')}; 429 if strcmp(TimeVarOption,'variable') 430 List=get(handles.TimeVarName,'String'); 431 TimeVarName=List{get(handles.TimeVarName,'Value')}; 432 elseif strcmp(TimeVarOption,'dim index') 433 List=get(handles.TimeVarName,'String'); 434 TimeDimName=List{get(handles.TimeVarName,'Value')}; 435 end 436 % A completer 437 % if strcmp(get(handles.TimeDimensionMenu,'Visible'),'on') 438 % TimeDimList=get(handles.TimeDimensionMenu,'String'); 439 % TimeDimIndex=get(handles.TimeDimensionMenu,'Value'); 440 % TimeDimName=TimeDimList{TimeDimIndex}; 441 % end 427 442 428 443 %check possible coordinates … … 432 447 for ilist=1:numel(Field.VarDimName) 433 448 dimnames=Field.VarDimName{ilist}; %list of dimensions for variable #ilist 434 if isequal(dimnames, {TimeDimName})449 if isequal(dimnames,TimeDimName) 435 450 test_coord(ilist)=0;%mark time variables fo elimination 451 end 452 if ischar(dimnames) 453 dimnames={dimnames}; 436 454 end 437 455 for idim=1:numel(dimnames)
Note: See TracChangeset
for help on using the changeset viewer.