Getting error "Too many input arguments"

Hi, I keep getting this error, even when I reduced myfunc to take in just one input as myfunc(a) and doing nothing in the function besides just passing it out as sSql = a.
methods function sSql = myfunc(a) sSql = a; end end

답변 (1개)

Ashish Sheikh
Ashish Sheikh 2016년 3월 3일

0 개 추천

Are u trying to define that inside a class. If yes , how are you using its object,,?

댓글 수: 3

JFz
JFz 2016년 3월 3일
I test it with this line: s = myfunc('abc')
JFz
JFz 2016년 3월 3일
Found out that I need to use obj in the input. The function should be myfunc(obj, a)
Guillaume
Guillaume 2016년 3월 3일
Well, if you're not using the object in the function, why is it a method of the object? At the very least, it should be a static method.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

태그

질문:

JFz
2016년 3월 3일

댓글:

2016년 3월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by