필터 지우기
필터 지우기

fsolve and truncation error

조회 수: 1 (최근 30일)
John Miller
John Miller 2012년 6월 19일
Hello,
how can I display the truncation error when I run fsolve?
thank you

답변 (1개)

Walter Roberson
Walter Roberson 2012년 6월 19일
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
John Miller 2012년 6월 19일
My function is a strong nonlinear 10 dimensional vector field :) to differentiate it with respect to t is not an good idea...
I thought about counting the amount of iteration. When the number of iterations is greater than a upper threshold, the timestep is reduced by a factor of a. When the number of iterations is less then the lower threshold, the timestep is increased by a factor of c.
Or how works the stepcontrol in the ode() solvers ? This works pretty good...
John Miller
John Miller 2012년 6월 20일
Are you supplying jacobians? No but fsolve can easily return the jacobian...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by