I recently adjusted a MATLAB function in an existing codebase to add a new optional output argument. I was confused to see that trying to invoke it with the new argument failed with "too many output arguments." (I did save the file! And tried restarting MATLAB.) The problem was that the function was also declared in a class file, which I hadn't modified. Updating that declaration to match the implementation file fixed the problem. I imagine this also applies to "too many input arguments."
No comments:
Post a Comment