% -*- texinfo -*- % @deftypefn {Function File} {[@var{x}] =} fmins(@var{f},@var{X0},@var{options},@var{grad},@var{P1},@var{P2}, ...) % % Find the minimum of a funtion of several variables. % By default the method used is the Nelder&Mead Simplex algorithm % % Example error: % fmins(inline('(x(1)-5).^2+(x(2)-8).^4'),[0;0]) % % @strong{Inputs} % @table @var % @item f % A string containing the name of the function to minimize % @item X0 % A vector of initial parameters fo the function @var{f}. % @item options % Vector with control parameters (not all parameters are used) % @verbatim % options(1) - Show progress (if 1, default is 0, no progress) % options(2) - Relative size of simplex (default 1e-3) % options(6) - Optimization algorithm % if options(6)==0 - Nelder & Mead simplex (default) % if options(6)==1 - Multidirectional search Method % if options(6)==2 - Alternating Directions search % options(5) % if options(6)==0 & options(5)==0 - regular simplex % if options(6)==0 & options(5)==1 - right-angled simplex % Comment: the default is set to 'right-angled simplex'. % this works better for me on a broad range of problems, % although the default in nmsmax is 'regular simplex' % options(10) - Maximum number of function evaluations % @end verbatim % @item grad % Unused (For compatibility with Matlab) % @item P1,P2, ... % Optional parameters for function @var{f} % % @end table % @end deftypefn