[Master Index] [Index for export/lyngby]

lyngby_opt_gradient

(export/lyngby/lyngby_opt_gradient.m)


Function Synopsis

[x, Info] = lyngby_opt_gradient(func, x0, varargin) 

Help text

 lyngby_opt_gradient   - Optimization with Gradient minimization

       function [x, Info] = lyngby_opt_gradient(func, x0)
 
       Input:    func       Function handle (@function)
                 x0         Vector with parameters to be optimized

       Property: MaxIterations [ {500} ] Positive integer
                 Parameters    Additional parameters

       Output:   x          Optimized parameters
                 Info       Structure with additional information

       Optimization with gradient descent. The step size is adapted
       depended.

       The input argument 'func' should contain a function handle
       constructed with the at-operator '@'. The function should
       return the function value and the gradient.

       Examples: 
         function [f, df] = sin2(x)
           f = sin(x);
           df = cos(x);

         function [f, df] = besseljn(x, n)
           h = abs(x) * 10^6 * eps;
           f = besselj(x, n);
           df = mean(gradient(besselj([x-h x x+h], n), h));

         lyngby_opt_gradient(@sin2, 4)
         lyngby_opt_gradient(@besseljn, 2.8, 'parameters', {8})

       See also LYNGBY, LYNGBY_OPT_CG. 
 
 $Id: lyngby_opt_gradient.m,v 1.1 2004/03/08 21:42:21 fnielsen Exp $

Cross-Reference Information

This function is called by

Produced by mat2html on Wed Jul 29 15:43:40 2009
Cross-Directory links are: OFF