Changeset 622 for trunk/src/view_field.m
- Timestamp:
- Apr 29, 2013, 11:35:27 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/view_field.m
r612 r622 363 363 % set(handles.RunMovie,'BackgroundColor',[1 0 0])%paint the command buttonback to red 364 364 365 366 %------------------------------------------------------------------- 365 %------------------------------------------------------------------------ 367 366 % --- translate coordinate to matrix index 368 %------------------------------------------------------------------- 367 %------------------------------------------------------------------------ 369 368 function [indx,indy]=pos2ind(x0,rangx0,nxy) 370 369 indx=1+round((nxy(2)-1)*(x0-rangx0(1))/(rangx0(2)-rangx0(1)));% index x of pixel 371 370 indy=1+round((nxy(1)-1)*(y12-rangy0(1))/(rangy0(2)-rangy0(1)));% index y of pixel 372 371 373 %------------------------------------------------------------------- 374 % --- Executes on button press in ' zoom'.375 %------------------------------------------------------------------- 372 %------------------------------------------------------------------------ 373 % --- Executes on button press in 'CheckZoom'. 374 %------------------------------------------------------------------------ 376 375 function CheckZoom_Callback(hObject, eventdata, handles) 377 if (get(handles.CheckZoom,'Value') == 1); 378 set(handles.CheckZoom,'BackgroundColor',[1 1 0]) 376 377 if get(handles.CheckZoom,'Value') 379 378 set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes 380 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 381 else 382 set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7]) 379 set(handles.CheckZoomFig,'Value',0)%desactivate zoom fig 380 end 381 382 %------------------------------------------------------------------------ 383 % --- Executes on button press in CheckZoomFig. 384 %------------------------------------------------------------------------ 385 function CheckZoomFig_Callback(hObject, eventdata, handles) 386 387 if get(handles.CheckZoomFig,'Value') 388 set(handles.CheckZoom,'value',0) 383 389 end 384 390 … … 839 845 % % eventdata reserved - to be defined in a future version of MATLAB 840 846 % % handles structure with handles and user data (see GUIDATA) 847 848 849 850
Note: See TracChangeset
for help on using the changeset viewer.