[Scilab-users] root calculation

2012-11-05 Thread Paul Carrico
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 __

Re: [Scilab-users] root calculation

2012-11-05 Thread Adrien Vogt-Schilb
Hi I would code the function, then plot it, then use fsolve On 05/11/2012 13:13, Paul Carrico wrote: 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 ? fr

Re: [Scilab-users] root calculation

2012-11-05 Thread michael . baudin
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. Th

Re: [Scilab-users] root calculation

2012-11-05 Thread Paul Carrico
part de michael.bau...@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://he

Re: [Scilab-users] root calculation

2012-11-05 Thread Adrien Vogt-Schilb
part de michael.bau...@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

Re: [Scilab-users] root calculation

2012-11-05 Thread Stéphane Mottelet
d'origine- De :users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De la part demichael.bau...@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 nonlin

Re: [Scilab-users] root calculation

2012-11-05 Thread Calixte Denizet
Hi Paul, If the exponent are always negative and the coefficients are always positive, the function is strictly decreasing (so the derivative is non-null), you can use a Newton method. function y=newton(fun, dfun, x0, eps) y=fun(x0) while abs(y) > eps x0 = x0 - y / dfun(x0);

Re: [Scilab-users] root calculation

2012-11-05 Thread Paul Carrico
“blocks”), isn’t it ? Paul De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De la part de Calixte Denizet Envoyé : lundi 5 novembre 2012 16:10 À : users@lists.scilab.org Objet : Re: [Scilab-users] root calculation Hi Paul, If the exponent are always negative

Re: [Scilab-users] root calculation

2012-11-05 Thread Calixte Denizet
sor (solving by "blocks"), isn't it ? Paul *De :*users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] *De la part de* Calixte Denizet *Envoyé :* lundi 5 novembre 2012 16:10 *À :* users@lists.scilab.org *Objet :* Re: [Scilab-users] root calculation Hi Paul, If th

[Scilab-users] root calculation + function crash

2012-12-13 Thread Paul Carrico
Dear all, For my information, is there a faster method than the Newton one to calculate roots (1 root for a non-linear equation) ? NB : in case of "division by zero" in a function, is it possible to generate a specific code in order to avoid program crash ? Thanks Paul ___

Re: [Scilab-users] root calculation + function crash

2012-12-13 Thread sgougeon
>NB : in case of “division by zero” in a function, is it possible to generate a >specific code in order to avoid program crash ? ieee(2) ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] root calculation + function crash

2012-12-13 Thread Paul Carrico
And how do you use it ? I've not understood -Message d'origine- De : users-boun...@lists.scilab.org [mailto:users-boun...@lists.scilab.org] De la part de sgoug...@free.fr Envoyé : jeudi 13 décembre 2012 16:58 À : International users mailing list for Scilab. Objet : Re: [Sc

Re: [Scilab-users] root calculation + function crash

2012-12-13 Thread Samuel Gougeon
Le 13/12/2012 18:20, Paul Carrico a écrit : And how do you use it ? I've not understood after ieee(2), any division by zero will yield %inf or -%inf instead of an error breaking the execution of the remainig code. help ieee // for more info ___