Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Minimization of arbitrary nonlinear function
Replies: 2   Last Post: Nov 4, 2005 5:53 PM

 Messages: [ Previous | Next ]
 Marcelo Marazzi Posts: 24 Registered: 8/29/05
Re: Minimization of arbitrary nonlinear function
Posted: Nov 4, 2005 5:53 PM

The Gauss-Newton iteration is of the form

J'*J*s = -J'F (1)
x = x + s

where J is the Jacobian of the vactor-valued function F
that lsqnonlin requires. (Levenberg-Marquardt is similar.)

In order to compute the step s, the algorithm will need
the vector-valued (non-squared) F to form the right hand
side in (1), and the Jacobian (whose rows are the gradients
of the individual F(i)'s) in both sides of (1).

Nonlinear least square solvers like lsqnonlin exploit the
structure of the problem, and need the non-squared version
to be able to form and solve the above equation at each iteration.

The function one passes to a nonlinear least squares solver
can't be totally arbitrary, it has to be a sum of squares.

Otherwise, for arbitrary scalar functions, one has to call an
optimization solver that doesn't assume any structure of the
objective, like fmincon, fminsearch, patternsearch, etc.

-marcelo

Sven Knecht wrote:
> Hi,
>
> I'm looking for a nonlinear optimization algorithm to minimize an
> arbitrary (nonlinear) objective function within lower and upper
> boundaries. More precisely, I want to use the Gauss-Newton and
> Levenberg-Marquard algorithm to minimize the euclidean norm of a
> distance vector (diff_y)
>
> obj=((sum(diff_y .^2))/nnodes).^0.5
>
> whereas diff_y is a function of two parameters within lb and ub.
> Lsqnonlin would solve this nonlinear (least-squares) problem. However
> it does only enable to pass a vector-valued function which is summed
> and squared internally (does not allow arbitrary functions). And
> fsolve with option ('NonlEqnAlgorithm','lm' or 'gn') can not handle
> lower and upper boundaries.
>
> Are there any possibilities to handle this problem in MATLAB? Do I
> have to write the code?
>
>