Extend Arithmetic precision
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
*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 Commenti
Risposta accettata
Walter Roberson
il 18 Mag 2012
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 Commenti
Walter Roberson
il 18 Mag 2012
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.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!