fsolve and truncation error
显示 更早的评论
Hello,
how can I display the truncation error when I run fsolve?
thank you
回答(1 个)
Walter Roberson
2012-6-19
0 个投票
fsolve() accepts arbitrarily complex functions. You cannot numerically calculate the truncation error of arbitrarily complex functions.
For example, suppose the function calculates the number of Odd Perfect Numbers, and suppose the solution come out with is 0. The truncation error would be the actual number of odd Perfect Numbers, a value that no one knows even though it has been actively studied for nearly 400 years. In order for fsolve() to return a (valid) truncation error, fsolve() would have to be able to solve a major outstanding problem in mathematical theory. No Can Do.
4 个评论
John Miller
2012-6-19
Walter Roberson
2012-6-19
You can pass an options structure that includes a PlotFcns field that specifies @optimplotresnorm to visually plot the norm of the residuals, or @optimplotfval for the function value. This would give you an idea of "how well" the fitting is doing for any one fsolve() call. But I don't think it will really help.
fsolve() calls are independent. All they can measure is how well they are doing on fitting that _particular_ function, how close they are getting to 0 and how quickly it is converging for that _particular_ function. But fsolve() has no way of knowing how much the solution would change for x(t+h) because that is a _different_ function.
How messy is your function? Would it be practical to do a perturbation analysis on it, or to differentiate it with respect to t? Are you supplying jacobians?
John Miller
2012-6-19
John Miller
2012-6-20
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!