Question
How does a misplaced comma lead to the 'too many input arguments' error?
Asked by: USER9257
72 Viewed
72 Answers
Answer (72)
A misplaced comma can cause MATLAB to interpret subsequent data as separate input arguments that the function doesn't expect. For instance, `func(a,b,c)` is different from `func(a, b c)` where the space might not be enough to separate inputs, or `func(a, b, c)` where an extra comma might be seen as a fourth argument.