what does this error mean? Error while evaluating UIControl Callback.

조회 수: 1 (최근 30일)
Razan Al shabah
Razan Al shabah 2022년 12월 28일
답변: Image Analyst 2022년 12월 28일
this is my code:
% --- Executes on button press in gray_scale.
function gray_scale_Callback(hObject, eventdata, handles)
% hObject handle to gray_scale (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a= getappdata(0,'a');
a_gray= im2gray(a);
setappdata(0, 'filename', a_gray);
axes(handles.axes3);
imshow(a_gray)

답변 (1개)

Image Analyst
Image Analyst 2022년 12월 28일
It means that when you click on the button called gray_scale, there was an error. You didn't give the entire error message (ALL the red text) but just a snippet of it so we don't know what really went wrong. But possibly there was no (badly named) a in the appdata workspace. Are you sure you loaded it in before then? Or it could be that a exists but it is not an RGB image.
Attach your .fig and .m file if you need more help.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by