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
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 08:51:17
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
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,
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
>> 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)
用regress来解;
参见matlab command窗口打入
help regress
你用cftool直接所有的函数的拟合情况和系数都会出来,matlab 2009a