考试必备模板3
x1=[78.0 113.5 130.0 154.0 169.0 187.0 206.0 214.0]’;
x2=[1.0 3.2 4.8 8.4 12.0 18.5 27.5 32.0]’;
y=[1.5 6.0 10.0 20.0 30.0 50.0 80.0 100.0]’;
x=[ones(8,1),x1,x2];
b=regress(y,x);
b’
ans = 1×3
9.4397 -0.1384 3.6796
∴Y 关于 X1、X2 的二元线性回归方程为Y=9.4397-0.1384X1+3.6796X2
d=[6.10 8.12 6.1 8.12 6.1 8.12]’;
h=[6.75 6.75 8.45 8.45 10.4 10.4]’;
V=[723 520 973 635 1307 798]’;
X=d./h;
Y=V;
X1=log(X);
Y1=log(Y);
p=polyfit(X1,Y1,1)
duishu=p(1,2)
a=exp(duishu)
n=p(1,1)
p = 1×2
-1.2891 6.4431
duishu = 6.4431
a = 628.3258
n = -1.2891
∴拟合方程为V=628.3258*(d/h)^(-1.2897)
当d=7.56,h=13.3时,V=1302,
当d=7.56,h=8.45时,V=725.