matlab多元线性回归
y=a0+a1*x1+a2*x2+a3*x3+a4*x4+a5*x5+a6f*x6+a7*x7+a8*x8+a9*x9+a10*x10y=[320320160710320...
y=a0+a1*x1+a2*x2+a3*x3+a4*x4+a5*x5+a6f*x6+a7*x7+a8*x8+a9*x9+a10*x10
y=[320 320 160 710 320 320 320 160 710 320];
x1=[2.3 1.7 1.3 1.7 1.7 1.6 1 1.7 1.7 1.7];
x2=[2.3 1.7 1.7 1.6 1.7 1.7 1 1.7 1.7 1.7];
x3=[2.3 1.7 1.3 1.7 1.7 1.7 2 1.7 1.7 1.7];
x4=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.8 2.7];
x5=[2.3 1.7 1.7 1.3 1.7 1.4 1 1.7 1.7 1.7];
x6=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
x7=[2.3 1.7 1.7 1.7 1.7 1.4 1 1.7 1.7 1.7];
x8=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.7 1.7];
x9=[2.3 1.7 1.7 1.4 1.7 1.7 1 1.7 1.7 1.7];
x10=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
求 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10?
怎么用MATLAB编?
要能复制粘贴到MATLAB里就能运行。
谢谢 展开
y=[320 320 160 710 320 320 320 160 710 320];
x1=[2.3 1.7 1.3 1.7 1.7 1.6 1 1.7 1.7 1.7];
x2=[2.3 1.7 1.7 1.6 1.7 1.7 1 1.7 1.7 1.7];
x3=[2.3 1.7 1.3 1.7 1.7 1.7 2 1.7 1.7 1.7];
x4=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.8 2.7];
x5=[2.3 1.7 1.7 1.3 1.7 1.4 1 1.7 1.7 1.7];
x6=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
x7=[2.3 1.7 1.7 1.7 1.7 1.4 1 1.7 1.7 1.7];
x8=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.7 1.7];
x9=[2.3 1.7 1.7 1.4 1.7 1.7 1 1.7 1.7 1.7];
x10=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
求 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10?
怎么用MATLAB编?
要能复制粘贴到MATLAB里就能运行。
谢谢 展开
展开全部
y=[320 320 160 710 320 320 320 160 710 320];
x1=[2.3 1.7 1.3 1.7 1.7 1.6 1 1.7 1.7 1.7];
x2=[2.3 1.7 1.7 1.6 1.7 1.7 1 1.7 1.7 1.7];
x3=[2.3 1.7 1.3 1.7 1.7 1.7 2 1.7 1.7 1.7];
x4=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.8 2.7];
x5=[2.3 1.7 1.7 1.3 1.7 1.4 1 1.7 1.7 1.7];
x6=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
x7=[2.3 1.7 1.7 1.7 1.7 1.4 1 1.7 1.7 1.7];
x8=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.7 1.7];
x9=[2.3 1.7 1.7 1.4 1.7 1.7 1 1.7 1.7 1.7];
x10=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
X=[ones(length(y),1) x1' x2' x3' x4' x5' x6' x7' x8' x9' x10'];
A=X\y';
a0=A(1);
a1=A(1);
a2=A(2);
a3=A(3);
a4=A(4);
a5=A(5);
a6=A(6);
a7=A(7);
a8=A(8);
a9=A(9);
a10=A(10);
x1=[2.3 1.7 1.3 1.7 1.7 1.6 1 1.7 1.7 1.7];
x2=[2.3 1.7 1.7 1.6 1.7 1.7 1 1.7 1.7 1.7];
x3=[2.3 1.7 1.3 1.7 1.7 1.7 2 1.7 1.7 1.7];
x4=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.8 2.7];
x5=[2.3 1.7 1.7 1.3 1.7 1.4 1 1.7 1.7 1.7];
x6=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
x7=[2.3 1.7 1.7 1.7 1.7 1.4 1 1.7 1.7 1.7];
x8=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.7 1.7];
x9=[2.3 1.7 1.7 1.4 1.7 1.7 1 1.7 1.7 1.7];
x10=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
X=[ones(length(y),1) x1' x2' x3' x4' x5' x6' x7' x8' x9' x10'];
A=X\y';
a0=A(1);
a1=A(1);
a2=A(2);
a3=A(3);
a4=A(4);
a5=A(5);
a6=A(6);
a7=A(7);
a8=A(8);
a9=A(9);
a10=A(10);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
y=[320 320 160 710 320 320 320 160 710 320];
x1=[2.3 1.7 1.3 1.7 1.7 1.6 1 1.7 1.7 1.7];
x2=[2.3 1.7 1.7 1.6 1.7 1.7 1 1.7 1.7 1.7];
x3=[2.3 1.7 1.3 1.7 1.7 1.7 2 1.7 1.7 1.7];
x4=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.8 2.7];
x5=[2.3 1.7 1.7 1.3 1.7 1.4 1 1.7 1.7 1.7];
x6=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
x7=[2.3 1.7 1.7 1.7 1.7 1.4 1 1.7 1.7 1.7];
x8=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.7 1.7];
x9=[2.3 1.7 1.7 1.4 1.7 1.7 1 1.7 1.7 1.7];
x10=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
Y=y';
X=[ones(length(y),1),x1',x2',x3',x4',x5',x6',x7',x8',x9',x10'];
[b,bint,r,rint,stats]=regress(Y,X)
x1=[2.3 1.7 1.3 1.7 1.7 1.6 1 1.7 1.7 1.7];
x2=[2.3 1.7 1.7 1.6 1.7 1.7 1 1.7 1.7 1.7];
x3=[2.3 1.7 1.3 1.7 1.7 1.7 2 1.7 1.7 1.7];
x4=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.8 2.7];
x5=[2.3 1.7 1.7 1.3 1.7 1.4 1 1.7 1.7 1.7];
x6=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
x7=[2.3 1.7 1.7 1.7 1.7 1.4 1 1.7 1.7 1.7];
x8=[2.3 1.7 1.7 1.7 1.7 1.7 1 1.7 1.7 1.7];
x9=[2.3 1.7 1.7 1.4 1.7 1.7 1 1.7 1.7 1.7];
x10=[2.3 1.7 1.7 1.7 1.5 1.7 1 1.7 1.7 1.7];
Y=y';
X=[ones(length(y),1),x1',x2',x3',x4',x5',x6',x7',x8',x9',x10'];
[b,bint,r,rint,stats]=regress(Y,X)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询