问题描述:
matlab 求拟合函数的系数
x1=[11.5 12.5 12.6 13 13.1 13.4 13.6 14]
x2=[26.5 26.3 26.4 26.3 26.9 26.9 26.8 26.8]
x3=[129.3264603 118.3568052 77.36493607 71.01408311 333.1311053 170.8956797 165.6995273 110.332]
x4=[1.592403843 1.592403843 1.592403843 1.744061352 1.061602562 1.516575089 2.502348897 1.971547615]
y=[4.2 4.2 2.8 2.7 9.1 7.8 5.2 4.6]
我想求y=a1x1 + a2x2 + a3x3 + a4x4,
1个回答
分类:
综合
2014-12-04
问题解答:
我来补答
x1=[11.5 12.5 12.6 13 13.1 13.4 13.6 14]';
x2=[26.5 26.3 26.4 26.3 26.9 26.9 26.8 26.8]';
x3=[129.3264603 118.3568052 77.36493607 71.01408311 333.1311053 170.8956797 165.6995273 110.332]';
x4=[1.592403843 1.592403843 1.592403843 1.744061352 1.061602562 1.516575089 2.502348897 1.971547615]';
y=[4.2 4.2 2.8 2.7 9.1 7.8 5.2 4.6]';
X=[ones(8,1) x1 x2 x3 x4];
[b,bint,r,rint,stats]=regress(y,X)
b,bint,stats,rcoplot(r,rint)
展开全文阅读