MATLAB中文论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 859|回复: 1|关注: 0

[已答复] 曲面拟合结果

[复制链接]

论坛优秀回答者

12

主题

1440

帖子

79

最佳答案
  • 关注者: 72
发表于 2015-8-11 22:53:17 | 显示全部楼层 |阅读模式
本帖最后由 stats01 于 2015-8-12 07:06 编辑

网友的拟合问题,结果如下:
x1=[1856.6, 1873.7, 1886.6, 1895.2, 1899.5, 1899.5, 1895.2, 1886.6, 1873.7, 1856.6, 1758.9, 1775.1, 1787.3, 1795.4, 1799.5, 1799.5, 1795.4, 1787.3, 1775.1, 1758.9, 1661.1, 1676.5, 1688.0, 1695.7, 1699.5, 1699.5, 1695.7, 1688.0, 1676.5, 1661.1, 1563.4, 1577.8, 1588.7, 1595.9, 1599.5, 1599.5, 1595.9, 1588.7, 1577.8, 1563.4, 1465.7, 1479.2, 1489.4, 1496.4, 1499.6, 1499.6, 1496.4, 1489.4, 1479.2, 1465.7, 1368.0, 1380.6, 1390.1, 1396.4, 1399.6, 1399.6, 1396.4, 1390.1, 1380.6, 1368.0, 1270.3, 1282.0, 1290.8, 1296.7, 1299.6, 1299.6, 1296.7, 1290.8, 1282.0, 1270.3, 1172.6, 1183.4, 1191.5, 1196.9, 1199.7, 1199.7, 1196.9, 1191.5, 1183.4, 1172.6, 1074.9, 1084.8, 1092.2, 1097.2, 1099.7, 1099.7, 1097.2, 1092.2, 1084.8, 1074.9, 977.15, 986.15, 992.93, 997.45, 999.72, 999.72, 997.45, 992.93, 986.15, 977.15]';
x2=[403.87, 315.08, 225.57, 135.54, 45.216, -45.216, -135.54, -225.57, -315.08, -403.87, 382.62, 298.49, 213.69, 128.41, 42.836, -42.836, -128.41, -213.69, -298.49, -382.62, 361.36, 281.91, 201.82, 121.28, 40.456, -40.456, -121.28, -201.82, -281.91, -361.36, 340.1, 265.33, 189.95, 114.14, 38.076, -38.076, -114.14, -189.95, -265.33, -340.1, 318.85, 248.74, 178.08, 107.01, 35.697, -35.697, -107.01, -178.08, -248.74, -318.85, 297.59, 232.16, 166.21, 99.875, 33.317, -33.317, -99.875, -166.21, -232.16, -297.59, 276.34, 215.6, 154.33, 92.741, 30.937, -30.937, -92.741, -154.33, -215.6, -276.34, 255.08, 199.0, 142.46, 85.607, 28.557, -28.557, -85.607, -142.46, -199.0, -255.08, 233.82, 182.41, 130.59, 78.473, 26.177, -26.177, -78.473, -130.59, -182.41, -233.82, 212.57, 165.83, 118.72, 71.339, 23.798, -23.798, -71.339, -118.72, -165.83, -212.57]';
y=[96.399, 96.399, 96.399, 96.399, 96.399, 96.399, 96.399, 96.399, 96.399, 96.399, 87.083, 87.083, 87.083, 87.083, 87.083, 87.083, 87.083, 87.083, 87.083, 87.083, 78.28, 78.28, 78.28, 78.28, 78.28, 78.28, 78.28, 78.28, 78.28, 78.28, 69.984, 69.984, 69.984, 69.984, 69.984, 69.984, 69.984, 69.984, 69.984, 69.984, 62.188, 62.188, 62.188, 62.188, 62.188, 62.188, 62.188, 62.188, 62.188, 62.188, 54.883, 54.883, 54.883, 54.883, 54.883, 54.883, 54.883, 54.883, 54.883, 54.883, 48.063, 48.063, 48.063, 48.063, 48.063, 48.063, 48.063, 48.063, 48.063, 48.063, 41.719, 41.719, 41.719, 41.719, 41.719, 41.719, 41.719, 41.719, 41.719, 41.719, 35.844, 35.844, 35.844, 35.844, 35.844, 35.844, 35.844, 35.844, 35.844, 35.844, 30.431, 30.431, 30.431, 30.431, 30.431, 30.431, 30.431, 30.431, 30.431, 30.431]';
结果为:
fx=@(b,x1,x2)=(b(1)+b(2)*x1+b(3)*x1.^2+b(4)*x1.^3+b(5)*x1.*x2.^2)./(1+b(6)*x1);
SSy =        44553
b =[2.231295242e+11  -666374733.6  238639.4663  -1244.574021  -1200.403003  -47601686.6];
RSS = 0.004879867162
MSe =   5.2472e-05
R^2 =    1or
SSy =   44553
fx=@(b,x1,x2)b(1)+b(2)*x1+b(3)*x1.^2+b(4)*x2.^2;
b =[3.614832868  0.00246228028  2.439519589e-05  2.517848814e-05]
RSS = 0.0528342160117
MSe =   0.00055615
R^2 =      1


如图:
结果表明与x2的作用不太大,主要与x1有关。






nh1121.jpg

新手

5 麦片

财富积分


050


0

主题

1

帖子

0

最佳答案
发表于 2015-8-12 11:57:48 | 显示全部楼层
多谢老哥的指教,这个结果正是我想要的,我很好奇你的程序是怎样的? 能达到这么好的效果,非常想再请教请教!望指教。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系我们|版权保护|小黑屋|Archiver|手机版|MATLAB中文论坛 ( 苏ICP备08100737号

GMT+8, 2017-1-24 21:04 , Processed in 0.219370 second(s), 51 queries , Xcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表