Too may input arguments
1 次查看(过去 30 天)
显示 更早的评论
Error using SampleGUImain>pushbutton2_Callback Too many input arguments.
Code:
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(handles)
imM=im>80;
axes(handles.axes2)
imshow(imM);
title('Threshold Image');
0 个评论
采纳的回答
Image Analyst
2016-9-24
Somehow you got rid of the required input arguments, which should be hObject, eventdata, handles
To fix:
function pushbutton2_Callback(hObject, eventdata, handles)
4 个评论
Image Analyst
2016-9-24
Global just declares that the variable is able to be "seen" by that function. It doesn't really have "an output" per se, it just makes the variable able to be seen. Of course if you've never assigned that variable ever before in any function, then it will be undefined. Show me the function where you first assigned a value to im.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!