MATLAB拟合多元非线性函数?
自变量x1=【10198.498.898.598.698.298.899.299.5100.6101.9101.5102.7102.4102.8103.1102.9103...
自变量x1=【
101 98.4 98.8 98.5 98.6 98.2 98.8 99.2 99.5 100.6 101.9 101.5 102.7 102.4 102.8 103.1 102.9 103.3 103.5 103.6 104.4 105.1 104.6 104.9 104.9 105.4 105.3 105.5 106.4 106.5 106.2 106.1 105.5 104.2 104.1 104.5 103.2 103.6 103.4 103 102.2 101.8
】
x2=【
496135.31 506708.07 530626.71 540481.21 548263.51 568916.2 573102.85 576698.95 576698.95 586643.29 594604.72 610224.52 625609.29 636072.26 649947.46 656561.22 663351.37 673921.72 674051.48 687506.92 696471.5 699776.74 710339.03 725851.79 733884.83 736130.86 758130.88 757384.56 763409.22 780820.85 772923.65 780852.3 787406.2 816829.25 825493.94 851590.9 855898.89 867177.63 895600 889600 900000 925000 919100
】
因变量y=【
6.903106 7.225627 8.235698 8.568031 9.057412 10.11868 11.53129 9.041437 9.371831 10.11123 10.83773 11.08377 10.10374 10.33224 10.57647 9.668508 8.662745 7.931444 7.811012 7.725547 7.753376 8.71688 8.187911 8.159127 8.164803 8.515319 8.592566 8.616842 7.977995 7.960922 7.722894 7.343536 6.759 7.079082 6.683803 6.322855 6.596952 7.004311 6.512667 6.890974 6.786185 6.329737 5.968858
】
怎样用MATLAB拟合y关于x1和x2的非线性曲线呢?选的模型是y=a*x1+b*x2+c*x1.^2+d*x2.^2+e 展开
101 98.4 98.8 98.5 98.6 98.2 98.8 99.2 99.5 100.6 101.9 101.5 102.7 102.4 102.8 103.1 102.9 103.3 103.5 103.6 104.4 105.1 104.6 104.9 104.9 105.4 105.3 105.5 106.4 106.5 106.2 106.1 105.5 104.2 104.1 104.5 103.2 103.6 103.4 103 102.2 101.8
】
x2=【
496135.31 506708.07 530626.71 540481.21 548263.51 568916.2 573102.85 576698.95 576698.95 586643.29 594604.72 610224.52 625609.29 636072.26 649947.46 656561.22 663351.37 673921.72 674051.48 687506.92 696471.5 699776.74 710339.03 725851.79 733884.83 736130.86 758130.88 757384.56 763409.22 780820.85 772923.65 780852.3 787406.2 816829.25 825493.94 851590.9 855898.89 867177.63 895600 889600 900000 925000 919100
】
因变量y=【
6.903106 7.225627 8.235698 8.568031 9.057412 10.11868 11.53129 9.041437 9.371831 10.11123 10.83773 11.08377 10.10374 10.33224 10.57647 9.668508 8.662745 7.931444 7.811012 7.725547 7.753376 8.71688 8.187911 8.159127 8.164803 8.515319 8.592566 8.616842 7.977995 7.960922 7.722894 7.343536 6.759 7.079082 6.683803 6.322855 6.596952 7.004311 6.512667 6.890974 6.786185 6.329737 5.968858
】
怎样用MATLAB拟合y关于x1和x2的非线性曲线呢?选的模型是y=a*x1+b*x2+c*x1.^2+d*x2.^2+e 展开
2个回答
展开全部
>> x1=[101 98.4 98.8 98.5 98.6 98.2 98.8 99.2 99.5 100.6 101.9 101.5 102.7 102.4 102.8 103.1 102.9 103.3 103.5 103.6 104.4 105.1 104.6 104.9 104.9 105.4 105.3 105.5 106.4 106.5 106.2 106.1 105.5 104.2 104.1 104.5 103.2 103.6 103.4 103 102.2 101.8
];
>> x2=[496135.31 506708.07 530626.71 540481.21 548263.51 568916.2 573102.85 576698.95 576698.95 586643.29 594604.72 610224.52 625609.29 636072.26 649947.46 656561.22 663351.37 673921.72 674051.48 687506.92 696471.5 699776.74 710339.03 725851.79 733884.83 736130.86 758130.88 757384.56 763409.22 780820.85 772923.65 780852.3 787406.2 816829.25 825493.94 851590.9 855898.89 867177.63 895600 889600 900000 925000 ];
>> x3=x1.^2;
>> x4=x2.^2;
>> y=[6.903106 7.225627 8.235698 8.568031 9.057412 10.11868 11.53129 9.041437 9.371831 10.11123 10.83773 11.08377 10.10374 10.33224 10.57647 9.668508 8.662745 7.931444 7.811012 7.725547 7.753376 8.71688 8.187911 8.159127 8.164803 8.515319 8.592566 8.616842 7.977995 7.960922 7.722894 7.343536 6.759 7.079082 6.683803 6.322855 6.596952 7.004311 6.512667 6.890974 6.786185 6.329737 ];
>> x=[ones(42,1),x1',x2',x3',x4'];
>> [b,bint,r,rint,stats]=regress(y',x)
> In regress at 78
b =
0
-0.1380
0.0001
-0.0014
-0.0000
e=b(1) a=b(2) b=b(3) c=b(4) d=b(5)
y=-0.1380*x1+0.0001*x2-0.0014*x1.^2
];
>> x2=[496135.31 506708.07 530626.71 540481.21 548263.51 568916.2 573102.85 576698.95 576698.95 586643.29 594604.72 610224.52 625609.29 636072.26 649947.46 656561.22 663351.37 673921.72 674051.48 687506.92 696471.5 699776.74 710339.03 725851.79 733884.83 736130.86 758130.88 757384.56 763409.22 780820.85 772923.65 780852.3 787406.2 816829.25 825493.94 851590.9 855898.89 867177.63 895600 889600 900000 925000 ];
>> x3=x1.^2;
>> x4=x2.^2;
>> y=[6.903106 7.225627 8.235698 8.568031 9.057412 10.11868 11.53129 9.041437 9.371831 10.11123 10.83773 11.08377 10.10374 10.33224 10.57647 9.668508 8.662745 7.931444 7.811012 7.725547 7.753376 8.71688 8.187911 8.159127 8.164803 8.515319 8.592566 8.616842 7.977995 7.960922 7.722894 7.343536 6.759 7.079082 6.683803 6.322855 6.596952 7.004311 6.512667 6.890974 6.786185 6.329737 ];
>> x=[ones(42,1),x1',x2',x3',x4'];
>> [b,bint,r,rint,stats]=regress(y',x)
> In regress at 78
b =
0
-0.1380
0.0001
-0.0014
-0.0000
e=b(1) a=b(2) b=b(3) c=b(4) d=b(5)
y=-0.1380*x1+0.0001*x2-0.0014*x1.^2
光点科技
2023-08-15 广告
2023-08-15 广告
通常情况下,我们会按照结构模型把系统产生的数据分为三种类型:结构化数据、半结构化数据和非结构化数据。结构化数据,即行数据,是存储在数据库里,可以用二维表结构来逻辑表达实现的数据。最常见的就是数字数据和文本数据,它们可以某种标准格式存在于文件...
点击进入详情页
本回答由光点科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询