In the documentation for LSQNONLIN, it says that the Levenberg-Marquardt algorithm option can't be used in conjunction with bound constraints. That being the case, is there ever any reason to run Levenberg-Marquardt under LSQNONLIN as opposed to FSOLVE? When bound constraints are omitted from LSQNONLIN, it is solving the same problem as FSOLVE. So, one would think it should just be calling the same engine.
LSQNONLIN and FSOLVE solve different type of optimization problems. While LSQNONLIN expects that f(x) is vector valued, it also implicitly sums and squares the values and forces to minimize this sum of squares.
FSOLVE on the other hand is for system of equations F(x) = 0 where it tries to find the root (zero) of a system of nonlinear equations. The goal of equation solving is to find a vector x that makes all Fi(x) = 0 individually.
Play games and win prizes!Learn more