fsolve and truncation error
Afficher commentaires plus anciens
Hello,
how can I display the truncation error when I run fsolve?
thank you
Réponses (1)
Walter Roberson
le 19 Juin 2012
0 votes
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 commentaires
John Miller
le 19 Juin 2012
Walter Roberson
le 19 Juin 2012
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
le 19 Juin 2012
John Miller
le 20 Juin 2012
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!