[Scilab-users] 'fsolver'

Stéphane Mottelet stephane.mottelet at utc.fr
Fri Jan 29 09:20:47 CET 2016


Hello,

Can you give us the actual definition of the function f(x) (i suppose 
you are trying to find x such that f(x)=0 ) ?

S.

Le 29/01/2016 08:38, fujimoto2005 a écrit :
> Hi, motterlet and Steer
>
> Thanks a lot your helps.
>
> Unfortunately 'lsqrsolve' did't give the smallest initial point for my
> function.
> The local minimum of f^2+a*x^2 is attained at x s.t. f(x)=-a*x.
> So if a is small such x is a neighborhood of x s.t. f(x)=0.
> But it is not necessarily of x which is the smallest one.
> Probably my function is not well-behaved as like cos(x) so that it fail.
>
> Now I get an awkward method.
> I find the first x(i) s.t. f(x(i))>0 and f(x(i-1))<0 where x(i)=x0+i*dx and
> x0 is some constant which is smaller than smallest solution of f(x)=0.
> Then I modify f(x) to new function fnew(x) as
> f(x)=f(x(i-1))+[f(x(i))-f(x(i-1))]/[x(i)-x(i-1)]*[x-x(i)] for x>=x(i) and
> fnew(x)=f(x) for x<=x(i).
> Using fsolv(x(i-1),fnew) gives the smallest solution of f(x)=0.
> With your helps I could get a practical solution.
> Thanks again.
>
> Best regards.
>
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/fsolver-tp4033340p4033350.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users


-- 
Département de Génie Informatique
EA 4297 Transformations Intégrées de la Matière Renouvelable
Université de Technologie de Compiègne -  CS 60319
60203 Compiègne cedex




More information about the users mailing list