The fminsearch.m function in the Optim-1.0.12 package is clearly
designed to implement functionality substantially identical with
Matlab's fminsearch function. But Matlab's fminsearch does not have the
"grad" argument -- I think it is a holdover from an ancient version of
Matlab when it was called "fmins". I suggest that argument be removed.
A diff -c file with proposed changes is attached.
--
Bob Walton
*** fminsearchorig.m Thu Mar 25 13:57:50 2010
--- fminsearch.m Thu Aug 26 12:52:00 2010
***************
*** 21,31 ****
## @seealso{fmin,fmins,nmsmax}
## @end deftypefn
! function [x fval] = fminsearch(funfun, X0, options, grad, varargin)
! if (nargin == 0); usage('[x fval] = fminsearch(funfun, X0, options,
grad, varargin)'); end
if (nargin < 3); options=[]; end
! if (nargin < 4); grad=[]; end
! if (nargin < 5); varargin={}; end
x = fmins(funfun, X0, options, grad, varargin{:});
fval = feval(funfun, x, varargin{:});
endfunction;
--- 21,31 ----
## @seealso{fmin,fmins,nmsmax}
## @end deftypefn
! function [x fval] = fminsearch(funfun, X0, options, varargin)
! if (nargin == 0); usage('[x fval] = fminsearch(funfun, X0, options,
varargin)'); end
if (nargin < 3); options=[]; end
! if (nargin < 4); varargin={}; end
! grad=[];
x = fmins(funfun, X0, options, grad, varargin{:});
fval = feval(funfun, x, varargin{:});
endfunction;
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev