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!