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

Réponses (1)

Ashish Sheikh
Ashish Sheikh le 3 Mar 2016

0 votes

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

3 commentaires

JFz
JFz le 3 Mar 2016
I test it with this line: s = myfunc('abc')
JFz
JFz le 3 Mar 2016
Found out that I need to use obj in the input. The function should be myfunc(obj, a)
Guillaume
Guillaume le 3 Mar 2016
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Entering Commands dans Centre d'aide et File Exchange

Produits

Tags

Question posée :

JFz
le 3 Mar 2016

Commenté :

le 3 Mar 2016

Community Treasure Hunt

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

Start Hunting!

Translated by