how to zoom into the distinct object in the image on matlab Gui by using push button or radio button
조회 수: 1 (최근 30일)
이전 댓글 표시
in this gui , i want to upload that image in this axes then it would zoom image by radio buttonons .so pls help me for the code
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/668798/image.png)
댓글 수: 0
답변 (1개)
Prakhar Rai
2021년 6월 29일
편집: Prakhar Rai
2021년 6월 29일
You could use the predefined ZOOM buttons.
In case you wish to code it out refer this page : zoom
You could refer this :
% --- Executes on button press in pushbutton.
function pushbutton_Callback(hObject, eventdata, handles)
if isempty(handles.hZoom)
handles.hZoom = zoom;
guidata(hObject, handles);
end
if ~strcmp(get(handles.hZoom,'Enable'), 'on')
handles.axesLimits = get(handles.axes1,{'xlim','ylim'});
guidata(hObject, handles);
set(handles.hZoom, 'Enable', 'on');
end
In the pushbutton, we create a zoom object and store its handle to the handles structure. We then enable it and so that the user can zoom in or out .If you wish to zoom in many times, then you should create an array with these axes limits.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!