matlab报错Z must be a matrix, not a scalar or vector,哪里出错了?
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/05/02 11:06:22
matlab报错Z must be a matrix, not a scalar or vector,哪里出错了?
代码为:
x=-3:0.01:3;
y=--2:0.01:2;
[x,y]=meshgrid(x,y);
f=(4-2.1*x.^2+(x.^4)./3).*x.^2+x.*y+(-4+4*y.^2).*y.^2;
mesh(x,y,f);
运行后报错:
Error using mesh (line 76)
Z must be a matrix, not a scalar or vector
Error in picture3 (line 5)
mesh(x,y,f);
请问是哪里出错了?是f=(4-2.1*x.^2+(x.^4)./3).*x.^2+x.*y+(-4+4*y.^2).*y.^2;出错了吗?
代码为:
x=-3:0.01:3;
y=--2:0.01:2;
[x,y]=meshgrid(x,y);
f=(4-2.1*x.^2+(x.^4)./3).*x.^2+x.*y+(-4+4*y.^2).*y.^2;
mesh(x,y,f);
运行后报错:
Error using mesh (line 76)
Z must be a matrix, not a scalar or vector
Error in picture3 (line 5)
mesh(x,y,f);
请问是哪里出错了?是f=(4-2.1*x.^2+(x.^4)./3).*x.^2+x.*y+(-4+4*y.^2).*y.^2;出错了吗?
y=--2:0.01:2;
这一句多了个负号
这一句多了个负号
matlab报错Z must be a matrix, not a scalar or vector,哪里出错了?
matlab程序运行错误 “Z must be a matrix,not a scalar or vector.”
matlab 为什么会出现Z must be a matrix,not a scalar or vector
matlab使用插值进行着色处理Z must be a matrix,not a scalar or vector
Error using ==> surf at 78 Z must be a matrix,not a scalar o
matlab 急救 Inputs must be a scalar and a square matrix.
Matlab求助:Inputs must be a scalar and a square matrix
matlab报错?Error using ==> mpower Inputs must be a scalar and
Is pressure a vector or scalar quantity?
matlab,Inner matrix dimensions must agree.哪里出错了
matlab 基础出错,求指导 Matrix must be square
MATLAB中nlinfit函数,老是报错什么mtimes Inner matrix dimensions must a