Why do I get the error message "Too Many Input/Output Arguments" when I try to execute a function?
Afficher commentaires plus anciens
Why do I get the following error messages:
Too many output arguments.
Too many input arguments.
Not enough input arguments.
Réponse acceptée
Plus de réponses (1)
Limabean
le 5 Mai 2017
16 votes
I found an additional way to get the the error "too many input arguments"
I had a class defined in an @folder, with functions in their own files. The primary class definition contains a signature for the function. I had declared 2 arguments in the function, but the signature for the function in the main file still had just one argument.
Solution: make sure the arguments listed in the function signature in your class file matches the arguments in the function you defined in the separate file.
This same thing holds true for "too many output arguments" as well; make sure the function signature matches.
Catégories
En savoir plus sur Functions dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!