필터 지우기
필터 지우기

Too may input arguments

조회 수: 1 (최근 30일)
Hazel Sialongo
Hazel Sialongo 2016년 9월 24일
댓글: Image Analyst 2016년 9월 24일
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');

채택된 답변

Image Analyst
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
Hazel Sialongo
Hazel Sialongo 2016년 9월 24일
I used global im but it has no image output.
Image Analyst
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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by