Extend Arithmetic precision
1 回表示 (過去 30 日間)
古いコメントを表示
*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*
0 件のコメント
採用された回答
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 件のコメント
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 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!