MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB GUI] 关于 button group 的问题 (https://www.labfans.com/bbs/showthread.php?t=13880)

[email protected] 2011-09-10 17:22

关于 button group 的问题
 
global im%使用全局变量im
%拿到你所选择的按钮的名称
str=get(hObject,'string');

axes(handles,axes1);

switch str
case '原图'
imshow(im);
case 'sobel'
BW=edge(rgb2gray(im),'sobel');
imshow(BW);
case 'prewitt'
BW=edge(rgb2gray(im),'prewitt');
imshow(BW);
case 'canny'
BW=edge(rgb2gray(im),'canny');
imshow(BW);
end;
为什么运行这段代码,点击‘sobel’‘prewitt’‘canny’时;
matlab的command window 会总是出现Error while evaluating uicontrol Callback错误啊
求解啊:confused:


所有时间均为北京时间。现在的时间是 05:07

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.