From: Yu Li on
In my previous post, I used fsolve. It seems that sometime the root converges to negative values, which do not make physical sense in the problem I am working on. So if I constraint the roots to be positive, does this mean that I have to use fmincon instead of fsolve? Thanks a lot
From: Steven Lord on

"Yu Li" <yuliyy(a)gmail.com> wrote in message
news:huubqo$4ah$1(a)fred.mathworks.com...
> In my previous post, I used fsolve. It seems that sometime the root
> converges to negative values, which do not make physical sense in the
> problem I am working on. So if I constraint the roots to be positive, does
> this mean that I have to use fmincon instead of fsolve? Thanks a lot

You could try starting FSOLVE from a different initial guess (or several
initial guesses.)

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com