plot is a built-in MATLAB function. You should be having another function in your workspace with the same name, which is shadowing the built-in plot function.
Execute the following command in MATLAB command window
If you see the last line similar to the one shown below, then your built-in plot function is shadowed
built-in (C:\Program Files\MATLAB\R2017b\toolbox\matlab\graph2d\plot)
Go to the first line of the output, it shows the local function or variable named as 'plot' which is shadowing the built-in.
Clear the variable or delete the shadowing file and this should resolve the issue
Best Answer