y1949b 发表于 2010-12-14 20:46:43

mathcad拟合不收敛的问题

小弟用mathcad拟合一组数据,得到的值,通过x值求y值可以,但写了代码,通过y值来求什么时候x值等于y,就不收敛,

具体的代码如图1,数据如图2,数据以及拟合后的图像如图3

小弟把代码也发上来,恳请大家给看看,再次先谢谢您了

y1949b 发表于 2010-12-14 20:53:38

清晰的代码

iomega 发表于 2010-12-15 04:05:51

Your s(a) value ranges between 0 and 700.
No wonder it won't give you any result when you try to find a such that s(a) = 900.

y1949b 发表于 2010-12-15 18:16:30

3# iomega
谢谢楼上的兄弟谢谢您!
如图 m(200)也是不收敛

iomega 发表于 2010-12-16 13:50:07

Try to use smaller value, rather than 0.1 in the m(p) subroutine.


4# y1949b

iomega 发表于 2010-12-16 13:57:52

Try to use smaller value, rather than 0.1 in the m(p) subroutine.

For instance, use 0.001 as a criteria, m(200) = 14.171.


Your code will easily trap into infinite loop if missing the value.


4# y1949b
iomega 发表于 2010-12-15 21:50 http://forum.simwe.com/images/common/back.gif
页: [1]
查看完整版本: mathcad拟合不收敛的问题