Filter löschen
Filter löschen

Too may input arguments

1 Ansicht (letzte 30 Tage)
Hazel Sialongo
Hazel Sialongo am 24 Sep. 2016
Kommentiert: Image Analyst am 24 Sep. 2016
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');

Akzeptierte Antwort

Image Analyst
Image Analyst am 24 Sep. 2016
Somehow you got rid of the required input arguments, which should be hObject, eventdata, handles
To fix:
function pushbutton2_Callback(hObject, eventdata, handles)
  4 Kommentare
Hazel Sialongo
Hazel Sialongo am 24 Sep. 2016
I used global im but it has no image output.
Image Analyst
Image Analyst am 24 Sep. 2016
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by