Mercurial > hg > octave-nkf
diff scripts/optimization/fzero.m @ 8596:8833c0b18eb2
enable default settings queries in optim funcs
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 27 Jan 2009 08:15:08 +0100 |
parents | ec2715c76039 |
children | ff61b53eb294 |
line wrap: on
line diff
--- a/scripts/optimization/fzero.m +++ b/scripts/optimization/fzero.m @@ -61,6 +61,13 @@ function [x, fval, info, output] = fzero (fun, x0, options = struct ()) + ## Get default options if requested. + if (nargin == 1 && ischar (fun) && strcmp (fun, 'defaults')) + x = optimset ("MaxIter", Inf, "MaxFunEvals", Inf, "TolX", 0, \ + "OutputFcn", [], "FunValCheck", "off"); + return; + endif + if (nargin < 2 || nargin > 3) print_usage (); endif