matlab ? Error using ==> mpower Matri>> x=linspace(-2,2,100);>> y=(x^2)*sin(x^2-x-2);plot(x,y)? Error using ==> mpowerMatrix must be square.这个要怎么改?
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 16:48:47
matlab ? Error using ==> mpower Matri>> x=linspace(-2,2,100);>> y=(x^2)*sin(x^2-x-2);plot(x,y)? Error using ==> mpowerMatrix must be square.这个要怎么改?
matlab ? Error using ==> mpower Matri
>> x=linspace(-2,2,100);
>> y=(x^2)*sin(x^2-x-2);plot(x,y)
? Error using ==> mpower
Matrix must be square.
这个要怎么改?
matlab ? Error using ==> mpower Matri>> x=linspace(-2,2,100);>> y=(x^2)*sin(x^2-x-2);plot(x,y)? Error using ==> mpowerMatrix must be square.这个要怎么改?
把^改成.^,前面加个小数点
同时*也改成.*
y=(x.^2).*sin(x.^2-x-2);