matlab中绘制二次曲线的问题

x=-3:0.1:3;
y=x^3-x-3;
plot(x,y);
error:Inputs must be a scalar and a square matrix
请问高手 错在哪里 为什么错误 ,或者给出正确答案!thanks

把y中^换成.^

>> x=-3:0.1:3;

>> y=x.^3-x-3;

>> plot(x,y);

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答