[Scilab-users] root calculation

Paul Carrico paul.carrico at free.fr
Mon Nov 5 14:45:47 CET 2012


All,

Thanks for the feedback ...
... a basic plot shows the curve is monotonic (see attachment) ; I should plot a 3D curve in order to study the influence of the exponents for example to verify there's one and only one root ...

... I've to code a fast function to solve this kind of equation ... hundred thousand (and maybe million) of similar equation to solve :-~

That's one of the reasons why I asked about the possible parallelization

Regards

Paul



-----Message d'origine-----
De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de michael.baudin at contrib.scilab.org
Envoyé : lundi 5 novembre 2012 13:59
À : International users mailing list for Scilab.
Objet : Re: [Scilab-users] root calculation

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
_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swt.jpg
Type: image/jpeg
Size: 30126 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20121105/b03779f9/attachment.jpg>


More information about the users mailing list