Home > freetb4matlab > optimization > fminunc.m

fminunc

PURPOSE ^

% Solve a unconstrained optimization problem defined by the function @var{fcn}.

SYNOPSIS ^

function [x, fval, info, output, grad, hess] = fminunc (fcn, x0, options = struct )

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn{Function File} {} fminunc (@var{fcn}, @var{x0}, @var{options})
% @deftypefnx{Function File} {[@var{x}, @var{fvec}, @var{info}, @var{output}, @var{fjac}]} = fminunc (@var{fcn}, @dots{})
% Solve a unconstrained optimization problem defined by the function @var{fcn}.
% @var{fcn} should accepts a vector (array) defining the unknown variables,
% and return the objective function value, optionally with gradient.
% In other words, this function attempts to determine a vector @var{x} such 
% that @code{@var{fcn} (@var{x})} is a local minimum.
% @var{x0} determines a starting guess. The shape of @var{x0} is preserved
% in all calls to @var{fcn}, but otherwise it is treated as a column vector.
% @var{options} is a structure specifying additional options.
% Currently, @code{fminunc} recognizes these options:
% @code{'FunValCheck'}, @code{'OutputFcn'}, @code{'TolX'},
% @code{'TolFun'}, @code{'MaxIter'}, @code{'MaxFunEvals'}, 
% @code{'GradObj'}, @code{'FinDiffType'}.
%
% If @code{'GradObj'} is @code{'on'}, it specifies that @var{fcn},
% called with 2 output arguments, also returns the Jacobian matrix
% of right-hand sides at the requested point.  @code{'TolX'} specifies
% the termination tolerance in the unknown variables, while 
% @code{'TolFun'} is a tolerance for equations. Default is @code{1e-7}
% for both @code{'TolX'} and @code{'TolFun'}.
% 
% For description of the other options, see @code{optimset}.
%
% On return, @var{fval} contains the value of the function @var{fcn}
% evaluated at @var{x}, and @var{info} may be one of the following values:
% 
% @table @asis
% @item 1
% Converged to a solution point. Relative gradient error is less than specified
% by TolFun.
% @item 2
% Last relative step size was less that TolX.
% @item 3
% Last relative decrease in func value was less than TolF. 
% @item 0
% Iteration limit exceeded.
% @item -3
% The trust region radius became excessively small. 
% @end table
%
% Note: If you only have a single nonlinear equation of one variable, using 
% @code{fminbnd} is usually a much better idea.
% @seealso{fminbnd, optimset}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003