需要非线性幂函数拟合的伪代码
计算科学
非线性方程
曲线拟合
2021-12-23 19:29:45
1个回答
数值分析的第10章(Richard L. Burden,J. Douglas Faires)为牛顿法提供了可读性好的伪代码。起始参数取自对数转换数据的线性问题的解。(见 Christian Clason 的评论给出了一个 链接 (线性解决方案,Mathworld Wolfram))
while not reached convergence criteria
calucate vector of residuals F(x) and Jacobian matrix J(x)
solve J(x)y = -F(x)
set x = x + y
这里
是为了指向一个有长度的向量:
这元素是
和雅可比是一个矩阵与排:
和


