Matlab R2015b Mac OS X - 使用gca绘制错误

时间:2016-03-14 15:33:06

标签: matlab

我试图在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)

为什么会这样?我该如何解决?

0 个答案:

没有答案