필터 지우기
필터 지우기

Extend Arithmetic precision

조회 수: 1 (최근 30일)
Kim O
Kim O 2012년 5월 18일
*Hello, when I want to solve a algebraic equation with fsolve(), it gives me a solution with low Arithmetic precision.
How can I change the Arithmetic precision of the solution?
Thank you! bye*

채택된 답변

Walter Roberson
Walter Roberson 2012년 5월 18일
fsolve(YourFunction, YourStartingPoint, optimset('TolFun', 1e-10, 'TolX', 1e-10))
You might also need to use 'MaxIter', 1000
If you need more than 16 digits of precision (taking into account round-off error) then you will need to use a different solution method entirely, such as using the Symbolic Toolkit.
  댓글 수: 2
Kim O
Kim O 2012년 5월 18일
Oh thank you for your answer. Another question: in fsolve I get sometimes an exitflag=3
help says: exitflag=3: Change in the residual was smaller than the specified tolerance. what does that mean??
btw: Can I solve Algebraic and DAE Equations with the Symbolic Toolkit??
Thank you Walter!
Walter Roberson
Walter Roberson 2012년 5월 18일
I am not clear on when the various flags are used. exitflag = 3 appears to mean that the problem was solved to within the tolerance it was told, or else perhaps that the solver got stuck in a local minimum. (fsolve() is not a global optimizer)
The Symbolic Toolbox can be asked to try to solve algebraic systems analytically using solve(), and numerically via numeric::solve() [a routine there is no direct access to from MATLAB]. The success of finding analytic solutions depends a fair bit on the version you are using; there was a big improvement in R2010b (I think it was.) If transcendental functions are involved, there might not be any analytic solution.
The Symbolic Toolbox can be asked to try to solve DAE by using dsolve(). I do not know what classes of problems it can deal with. In particular I am not certain there is any routine in the Symbolic toolbox to deal with partial differential equations.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Solvers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by