matlab多元线性回归问题!必有重谢!Y=[2.78689636 2.77089316 2.75659609 2.75261281 2.71557441 2.69485056 2.68402689]X1=[199898.41 222123.69 242260.84 251602.56 345273.76 445956.84 499283.56]X2=[5.00254E-06 4.502E-06 4.12778E-06 3.97452E-06 2.
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 08:35:09
matlab多元线性回归问题!必有重谢!Y=[2.78689636 2.77089316 2.75659609 2.75261281 2.71557441 2.69485056 2.68402689]X1=[199898.41 222123.69 242260.84 251602.56 345273.76 445956.84 499283.56]X2=[5.00254E-06 4.502E-06 4.12778E-06 3.97452E-06 2.
matlab多元线性回归问题!必有重谢!
Y=[2.78689636 2.77089316 2.75659609 2.75261281 2.71557441 2.69485056 2.68402689]
X1=[199898.41 222123.69 242260.84 251602.56 345273.76 445956.84 499283.56]
X2=[5.00254E-06 4.502E-06 4.12778E-06 3.97452E-06 2.89625E-06 2.24237E-06 2.00287E-06]
X3=[2.50254E-11 2.0268E-11 1.70386E-11 1.57968E-11 8.38828E-12 5.02822E-12 4.01149E-12]
X4=[1.25191E-16 9.12463E-17 7.03316E-17 6.27848E-17 2.42946E-17 1.12751E-17 8.03449E-18]
X5=[6.26271E-22 4.10791E-22 2.90313E-22 2.4954E-22 7.03632E-23 2.5283E-23 1.6092E-23]
以上是数据,要求Y=A0+A1*X1+A2*X2+A3*X3+A4*X4+A5*X5的系数A1,A2,A3,A4,A5
最好是编出程序粘贴进去就能做
上边求的量还有A0
matlab多元线性回归问题!必有重谢!Y=[2.78689636 2.77089316 2.75659609 2.75261281 2.71557441 2.69485056 2.68402689]X1=[199898.41 222123.69 242260.84 251602.56 345273.76 445956.84 499283.56]X2=[5.00254E-06 4.502E-06 4.12778E-06 3.97452E-06 2.
close all;
clear;
clc;
Y=[2.78689636 2.77089316 2.75659609 2.75261281 2.71557441 2.69485056 2.68402689];
X1=[199898.41 222123.69 242260.84 251602.56 345273.76 445956.84 499283.56];
X2=[5.00254E-06 4.502E-06 4.12778E-06 3.97452E-06 2.89625E-06 2.24237E-06 2.00287E-06];
X3=[2.50254E-11 2.0268E-11 1.70386E-11 1.57968E-11 8.38828E-12 5.02822E-12 4.01149E-12];
X4=[1.25191E-16 9.12463E-17 7.03316E-17 6.27848E-17 2.42946E-17 1.12751E-17 8.03449E-18];
X5=[6.26271E-22 4.10791E-22 2.90313E-22 2.4954E-22 7.03632E-23 2.5283E-23 1.6092E-23];
X=[X1; X2; X3; X4; X5];fun=inline('a(1)+a(2)*x(1,:)+a(3)*x(2,:)+a(4)*x(3,:)+a(5)*x(4,:)+a(6)*x(5,:)','a','x');
beta0=[0 0 0 0 0 0];
beta=nlinfit(X,Y,fun,beta0);
l=length(Y);
t=1:l;
y1=beta(1)+beta(2)*X(1,:)+beta(3)*X(2,:)+beta(4)*X(3,:)+beta(5)*X(4,:)+beta(6)*X(5,:);
plot(t,Y,'K+',t,y1)