Matlab中出现了Matrix must be square.>> syms x y z X Yx=-5:0.1:5; y=x;[X,Y]=meshgrid(x,y);x^2.*z^3+9.*y^2.*z^3/80==(x^2+9.*y^2/4+z^2-1)^3;surf(X,Y,z)Error using ==> mpowerMatrix must be square.这个是什么问题?系统把x y z X Y当成了矩
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 06:04:07
Matlab中出现了Matrix must be square.>> syms x y z X Yx=-5:0.1:5; y=x;[X,Y]=meshgrid(x,y);x^2.*z^3+9.*y^2.*z^3/80==(x^2+9.*y^2/4+z^2-1)^3;surf(X,Y,z)Error using ==> mpowerMatrix must be square.这个是什么问题?系统把x y z X Y当成了矩
Matlab中出现了Matrix must be square.
>> syms x y z X Y
x=-5:0.1:5; y=x;
[X,Y]=meshgrid(x,y);
x^2.*z^3+9.*y^2.*z^3/80==(x^2+9.*y^2/4+z^2-1)^3;
surf(X,Y,z)
Error using ==> mpower
Matrix must be square.
这个是什么问题?系统把x y z X Y当成了矩阵?
新手希望老鸟多教教.
Matlab中出现了Matrix must be square.>> syms x y z X Yx=-5:0.1:5; y=x;[X,Y]=meshgrid(x,y);x^2.*z^3+9.*y^2.*z^3/80==(x^2+9.*y^2/4+z^2-1)^3;surf(X,Y,z)Error using ==> mpowerMatrix must be square.这个是什么问题?系统把x y z X Y当成了矩
x^2.*z^3+9.*y^2.*z^3/80==(x^2+9.*y^2/4+z^2-1)^3;
x^2默认是矩阵乘法,而你需要的是对应元素相乘,应该是x.^2
另外,这一句还有其他问题,应该给出的是z的显示表达式,并且应该用X和Y,而不是x,y