Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
初级会员
注册日期: 2009-05-22
年龄: 38
帖子: 2
声望力: 0 ![]() |
![]()
怎样选择a,b的初值,才能使结果收敛的更好
function f = curvefun1( x , tdata) f =( x(1)*tdata.^(3/2) + x(2)*tdata ); end tdata = load('700-1-depthSI.txt'); cdata=load('700-1-loadSI.txt'); for a=1000000:1000000:10000000 for b=-10:1:0 x0=[a,b]; x = lsqcurvefit(' curvefun1 ',x0,tdata,cdata) a b end end %原始数据tdata = 5.3307e-007 7.1173e-007 8.9054e-007 5.2882e-007 5.2753e-007 8.8644e-007 8.8518e-007 5.2330e-007 5.2197e-007 1.2414e-006 1.4200e-006 1.2385e-006 1.4172e-006 1.2356e-006 1.2344e-006 8.7271e-007 1.0515e-006 1.2302e-006 1.9497e-006 1.9480e-006 1.9468e-006 1.7653e-006 1.7639e-006 2.3030e-006 1.9413e-006 1.7598e-006 1.9386e-006 …… cdata = 5.2342e-006 5.9606e-006 6.6329e-006 7.3346e-006 7.9906e-006 8.6807e-006 9.3248e-006 1.0082e-005 1.0751e-005 1.1356e-005 1.2108e-005 1.2801e-005 1.3490e-005 1.4204e-005 1.4853e-005 1.5522e-005 1.6207e-005 1.6902e-005 1.7520e-005 1.8317e-005 1.8922e-005 1.9614e-005 2.0285e-005 2.0981e-005 2.1675e-005 2.2346e-005 2.3020e-005 2.3727e-005 …… |
![]() |
![]() |