满意答案
nucynucy
2013.06.17
采纳率:47% 等级:12
已帮助:10834人
建一个axes 在建一个按钮比如push button,就可以实现按钮函数的话比如:
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global im;
[filename ,pathname]=uigetfile({'*.jpg';'*.bmp';'*.bmp'},'选择图片');
str=[pathname filename];
im=imread(str);
axes(handles.axes1);
imshow(im);
给你看下效果
12分享举报