我试图在Matlab R2015b(Mac OS X)中绘制一个非常简单的函数,就像在这个网页中一样:
http://nl.mathworks.com/help/matlab/creating_plots/using-high-level-plotting-functions.html
x = linspace(0,2*pi,100);
y = sin(x);
figure
plot(x,y)
但是我收到以下错误
Error using gca
While setting the 'Parent' property of 'Axes':
The value '---' is not a valid line style.
Error in newplot (line 68)
ax = gca(fig);
Error in my_function (line 4)
plot(x,y)
为什么会这样?我该如何解决?