[Scilab-users] root calculation
michael.baudin at contrib.scilab.org
michael.baudin at contrib.scilab.org
Mon Nov 5 13:58:43 CET 2012
Hi,
This is a nonlinear equation, for which we are searching a zero.
The fsolve function is designed for this purpose:
http://help.scilab.org/fsolve
Notice that there might not be a solution. This is why the algorithm is
an optimization problem, where the square norm of f(x) is minimized.
This method also works for a system of nonlinear equations, so that this
is (much) more general than dichotomy, secant, Brent, etc... which are
one-variable solvers.
No 1-variable method is available at the Scilab level, to my knowledge.
But the Brent method is used internally in the computation of the
inverse Cumulated Distribution Function (quantile) by the DCDFLIB
library (e.g. X=cdfnor("X",Mean,Std,P,Q)). Notice that Matlab has the
fzero function :
http://www.mathworks.fr/fr/help/matlab/ref/fzero.html
which uses Brent's method.
But this method is not available directy in Scilab. This is a good
design choice in my opinion, since fsolve is much more general. But I
guess that fzero may be faster and more robust, in some cases.
Best regards,
Michaël
Le 2012-11-05 13:13, Paul Carrico a écrit :
> Dear all,
>
> This a stupid question, but how can I solve directly in, Scilab an
> equation such as :
>
> 0.403*X^(-0.121) + 60.5*X^(-0.73) - 0.1839 = 0
>
> ?
>
> Is-it necessary to code a function ? from memory : dichotomy method,
> secant method, Brent one etc. …
>
> Regards
>
> Paul
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
More information about the users
mailing list