Why do I get the error message "Too Many Input/Output Arguments" when I try to execute a function?
Show older comments
Why do I get the following error messages:
Too many output arguments.
Too many input arguments.
Not enough input arguments.
Accepted Answer
More Answers (1)
Limabean
on 5 May 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.
Categories
Find more on Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!