matlab gui界面设计,设计一个按钮,要求按下就可以读入图片(从几幅图中选择),怎么做,回调函数怎样

如题所述

第1个回答  2012-05-17
% --- 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';'*.gif'}, '开始');

str=[pathname filename];

im=imread(str);
axes(handles.axes1);
imshow(im);本回答被提问者采纳
第2个回答  2012-05-04
uigetfile追问

popupmenu的回调函数该怎么写,要求是可以弹出两个选项,单击一个选项就可以给黑白图片加上一种噪声。谢谢先

相似回答