The in-build matlab function area() stopped working. I tried to run the example from the documentation:
Y = [1, 5, 3;
3, 2, 7;
1, 5, 3;
2, 6, 1];
figure
area(Y)
but I would get the error message
Error using area (line 35)
Too many input arguments.
I am using 8.5.0.197613 (R2015a).
This CW answer was created to indicate that this question was resolved.
This turned out to be an issue related to the MATLAB search path. Using restoredefaultpath
resolved it.
A symptom of this problem can appear when running which -all <function name>
(without the <>
), and getting back a list with unexpected entries.
From the documentation of which
:
The results are ordered according to the Function Precedence Order, unless they are shadowed. Among shadowed results, you should not rely on the order of the functions and methods in
str
. To determine if a result is shadowed, callwhich
without specifying an output.which
indicates shadowed results by the comment,% Shadowed
.