MATLAB: Error message from ‘fsolve’

fsolve

Hello,
Will you please spare a few second to help clarify what went wrong with my code, I am getting the following message:
Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using Levenberg-Marquardt algorithm instead.
> In fsolve at 285
In paper2_vL1 at 89
No solution found.
fsolve stopped because the relative size of the current step is less than the
selected value of the step size tolerance, but the vector of function values
is not near zero as measured by the selected value of the function tolerance.
I will post the code if required. I guess it has to do with my initial values? Thank you R.

Best Answer

I can’t clarify it but I can make a guess. Since fsolve uses nonlinear least-squares gradient descent algorithms, it is sensitive to the initial parameter estimates (in the documentation, x0). What probably occurred is that it encountered a local minimum and converged on it, but wasn’t at all happy with the result and threw the Warning.
The solution is to experiment with other initial parameter estimates. Eventually, you’ll find a set that leads to a solution near or at the global minimum. This is what you want.