matlab 多元非线性拟合 nlinfit y=a0*x1^a1*x2^a2*x3^a3*x4^a4x1=152.64 104.5\x05131.73\x05146.83\x05118.24\x0599.22x2=286.08 485.68\x051164.48\x05506.17\x051195.93\x051545.75x3=103.9\x05 101.82\x05101.47\x05104.77\x05105.9\x0599.32x4=238033.47 27

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 01:24:55
matlab 多元非线性拟合 nlinfit y=a0*x1^a1*x2^a2*x3^a3*x4^a4x1=152.64 104.5\x05131.73\x05146.83\x05118.24\x0599.22x2=286.08 485.68\x051164.48\x05506.17\x051195.93\x051545.75x3=103.9\x05 101.82\x05101.47\x05104.77\x05105.9\x0599.32x4=238033.47 27
xJ[AW%'U"N*ڀ- Hhu՛D3s %uf3o;SO?֖yesmRj+Zh^JW"W EC*vD`9b'J7XfL.&>ĮoDJbb q`ZH!')8Kp&>KfA óJup&gJsXW_']l\7QK\ K8C1^|?EB@.GR‡Y?iфeό d}ϧ98;BR\^Y50"<[RQHA #l|pOA:_|3f{'R ;[ؑ!=c0G }³#gbQ 7F1֙in6,+ZPxA l)faqR\Knki.͇Rtžn EtG)r *grԸ0GaBe魙_a

matlab 多元非线性拟合 nlinfit y=a0*x1^a1*x2^a2*x3^a3*x4^a4x1=152.64 104.5\x05131.73\x05146.83\x05118.24\x0599.22x2=286.08 485.68\x051164.48\x05506.17\x051195.93\x051545.75x3=103.9\x05 101.82\x05101.47\x05104.77\x05105.9\x0599.32x4=238033.47 27
matlab 多元非线性拟合 nlinfit y=a0*x1^a1*x2^a2*x3^a3*x4^a4
x1=152.64 104.5\x05131.73\x05146.83\x05118.24\x0599.22
x2=286.08 485.68\x051164.48\x05506.17\x051195.93\x051545.75
x3=103.9\x05 101.82\x05101.47\x05104.77\x05105.9\x0599.32
x4=238033.47 276505.32 322134.37 379226.81 442136.63 559484.38
y=1500\x052000\x052400\x053200\x053500\x054700

matlab 多元非线性拟合 nlinfit y=a0*x1^a1*x2^a2*x3^a3*x4^a4x1=152.64 104.5\x05131.73\x05146.83\x05118.24\x0599.22x2=286.08 485.68\x051164.48\x05506.17\x051195.93\x051545.75x3=103.9\x05 101.82\x05101.47\x05104.77\x05105.9\x0599.32x4=238033.47 27
两边取对数,
log(y)=log(a0)+a1*log(x1)+a2*log(x2)+a3*log(x3)+a4*log(x4)
这样就变成一个多元线性拟合问题了
x1=[152.64 104.5\x05131.73\x05146.83\x05118.24\x0599.22];
x2=[286.08 485.68\x051164.48\x05506.17\x051195.93\x051545.75];
x3=[103.9\x05 101.82\x05101.47\x05104.77\x05105.9\x0599.32];
x4=[238033.47 276505.32 322134.37 379226.81 442136.63 559484.38];
y=[1500\x052000\x052400\x053200\x053500\x054700];
A=[ones(6,1) log(x1)' log(x2)' log(x3)' log(x4)'];
c=A\log(y)';
a0=exp(c(1))
a1=c(2)
a2=c(3)
a3=c(4)
a4=c(5) .
a0 =
3.3727e-005
a1 =
0.0265
a2 =
-0.0193
a3 =
0.1990
a4 =
1.3517

这个函数先两边取log变为:
log(y)=log(a0)+a1*log(x1)+a2*log(x2)+a3*log(x3)+a4*log(x4)
再用regress线性拟合,程序如下:
x1=[152.64 104.5 131.73146.83 118.24 99.22]';
x2=[286.08 485.68 1164.48 506.17 1195.93 15...

全部展开

这个函数先两边取log变为:
log(y)=log(a0)+a1*log(x1)+a2*log(x2)+a3*log(x3)+a4*log(x4)
再用regress线性拟合,程序如下:
x1=[152.64 104.5 131.73146.83 118.24 99.22]';
x2=[286.08 485.68 1164.48 506.17 1195.93 1545.75]';
x3=[103.9 101.82 101.47104.77 105.9 99.32]';
x4=[238033.47 276505.32 322134.37 379226.81 442136.63 559484.38]';
y=[15002000 2400 3200 35004700]';
X=[x1,x2,x3,x4];
B=regress(log(y),log(X));
a1=B(1)
a2=B(2)
a3=B(3)
a4=B(4)
得到:
a1 =
0.1456
a2 =
-0.0325
a3 =
-2.1101
a4 =
1.3449

收起