Matlab程序提示错误:Error using * Inner matrix dimensions must agree.Matlab程序:x=0.01:0.01:9; y=(4.5-x)*sqrt(9*x-x.^2); 提示:Error using * Inner matrix dimensions must agree.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 03:26:26
Matlab程序提示错误:Error using * Inner matrix dimensions must agree.Matlab程序:x=0.01:0.01:9; y=(4.5-x)*sqrt(9*x-x.^2); 提示:Error using * Inner matrix dimensions must agree.

Matlab程序提示错误:Error using * Inner matrix dimensions must agree.Matlab程序:x=0.01:0.01:9; y=(4.5-x)*sqrt(9*x-x.^2); 提示:Error using * Inner matrix dimensions must agree.
Matlab程序提示错误:Error using * Inner matrix dimensions must agree.
Matlab程序:
x=0.01:0.01:9;
y=(4.5-x)*sqrt(9*x-x.^2);
提示:Error using *
Inner matrix dimensions must agree.

Matlab程序提示错误:Error using * Inner matrix dimensions must agree.Matlab程序:x=0.01:0.01:9; y=(4.5-x)*sqrt(9*x-x.^2); 提示:Error using * Inner matrix dimensions must agree.

程序改成如下:(注:你少加了个点,在(4.5-x)后面加点)

x=0.01:0.01:9;
y=(4.5-x).*sqrt(9*x-x.^2);
plot(x,y)

结果