怎么用MATLAB拟合非线性多元函数?例如X1={0,0,0,0,0,0,0,111,227,441,668,882,1000,970,786,496,296,120,2,0}X2={0,0,0,0,0,91,207,430,611,869,1000,955,689,461,243,40,0,0,0,0,0}X3={0,0,48,144,355,536,724,956,1000,930,753,558,333,213,111,17,0,0,
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 09:52:55
怎么用MATLAB拟合非线性多元函数?例如X1={0,0,0,0,0,0,0,111,227,441,668,882,1000,970,786,496,296,120,2,0}X2={0,0,0,0,0,91,207,430,611,869,1000,955,689,461,243,40,0,0,0,0,0}X3={0,0,48,144,355,536,724,956,1000,930,753,558,333,213,111,17,0,0,
怎么用MATLAB拟合非线性多元函数?
例如X1={0,0,0,0,0,0,0,111,227,441,668,882,1000,970,786,496,296,120,2,0}
X2={0,0,0,0,0,91,207,430,611,869,1000,955,689,461,243,40,0,0,0,0,0}
X3={0,0,48,144,355,536,724,956,1000,930,753,558,333,213,111,17,0,0,0,0}
X4={0,84,261,434,760,940,1000,910,750,477,283,136,0,0,0,0,0,0,0,0}
X5={0,0,0,0,0,0,0,0,0,0,0,47,120,110,57,0,0,0,0,0}
x6={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
Y={45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140}
其中X1、X2、X3、X4、X5、X6为自变量Y为因变量,不知道能不能拟合为线性Y=a*X1+b*X2+c*X3+d*X4+e*X5+f*X6的形式以及非线性的形式.
不知道matlab里面有没有函数可以拟合上面的函数,
请以我给出的这七组数据拟合出Y=a*X1+b*X2+c*X3+d*X4+e*X5+f*X6+e这个函数,
怎么用MATLAB拟合非线性多元函数?例如X1={0,0,0,0,0,0,0,111,227,441,668,882,1000,970,786,496,296,120,2,0}X2={0,0,0,0,0,91,207,430,611,869,1000,955,689,461,243,40,0,0,0,0,0}X3={0,0,48,144,355,536,724,956,1000,930,753,558,333,213,111,17,0,0,
程序是A=[0 0 0 0 0 0 45
0 0 0 84 0 0 50
0 0 48 261 0 0 55
0 0 144 434 0 0 60
0 0 355 760 0 0 65
0 91 536 940 0 0 70
0 207 724 1000 0 0 75
111 430 956 910 0 0 80
227 611 1000 750 0 0 85
441 869 930 477 0 0 90
668 1000 753 283 0 0 95
882 955 558 136 47 0 100
1000 689 333 0 120 0 105
970 461 213 0 110 0 110
786 243 111 0 57 0 115
496 40 17 0 0 0 120
296 0 0 0 0 0 125
120 0 0 0 0 0 130
2 0 0 0 0 0 135
0 0 0 0\x090 0 140];
y=A(:,7),x=A(:,1:6);
B= REGRESS(y,x)
a=B(1),b=B(2),c=B(3),d=B(4),e=B(5),f=B(6)
得结果
B =
0.2935
-0.1263
0.0126
0.0965
-1.0472
0