马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
我在gui界面放了一个axes控件,然后用一个"放置图片按扭"把图片加载到axes上并显示了出来,现在想另外放一个"去除图片按扭"把axes上的图片去掉,请问怎样写去除图片按扭"的回掉函数.
谢谢各位大虾指点啊.两个按扭函数如下:请问如何编写pushbutton2_Callback.非常谢谢!
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)
[FileName,PathName]=uigetfile(...
{'*.bmp;*.jpg;*.tif;*.png','IMAGE Files (*.bmp,*.jpg,*.tif,*.png)';
'*.bmp','Bitmap (*.bmp)'; ...
'*.jpg','Joint Photographic Experts Group (*.jpg)'; ...
'*.tif','Tagged Image files (*.tif)'; ...
'*.png','Portable Network Graphics (*.png)'; ...
'*.*','All Files (*.*)'},...
'File Selector','')
x1=imread([PathName,FileName]);
imshow(x1)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[ 本帖最后由 eight 于 2007-6-17 23:37 编辑 ] |