May be you can use optim instead of fsolve using f(x)^2+alpha*norm(x)^2
as cost function with alpha small enough
If you cannot compute the gradient of the cost function you can use the
numderivative function to estimate it.
Serge
Le 27/01/2016 16:54, fujimoto2005 a écrit :
The feature of my f(x) defined for x>0 is as follows.
f(x)<0 for x<x1
f(x1)=0
f(x) >0 for x1<x<x2
f(x)=0 for x>=x2
'fsolver' gives some x such as x>x2 as a solution.
I want to get x1 as a solution.
--
View this message in context:
http://mailinglists.scilab.org/fsolver-tp4033340p4033345.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users