r****y 发帖数: 1437 | 1
三个方程显然不可能一样,定义
f(a, b, c) = sum[(y*-a-bcos(x*-c))^2], where y* is observed value,
x* is self-variable.
use d to represent partial derivative,
df/da = 0
df/db = 0
df/dc = 0
Then to get a, b, c, of course, whether you can solve this set of
equation is another problem, but df/da, df/db, df/dc obviously are different. | I***e 发帖数: 1136 | 2 Let the ls function be
Sum( Yi - a - b cos( Xi-c ))^2...
Then, the three equations are:
Sum( Yi - a - b cos( Xi-c ) ) = 0
Sum( cos( Xi-c ) ( Yi - a - b cos( Xi-c ) ) = 0
Sum( b sin( Xi-c ) ( Yi - a - b cos( Xi-c ) ) = 0
Sure they are different.
You can use SAS to solve this kind of nonlinear least square fitting
problems. The procedure is called NLIN. Check out the following webpage
for detailed info:
http://sasdocs.ats.ucla.edu/
Good luck.
icare |
|