Mercurial > hg > octave-lyh
diff scripts/optimization/fminbnd.m @ 13027:b9a89ca0fb75
prevent optimization functions from setting ans in workspace at startup
* fminbnd.m, fminunc.m, fsolve.m, fzero.m, lsqnonneg.m, pqpnonneg.m,
qp.m: Discard result from call to __all_opt__ in PKG_ADD command.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 29 Aug 2011 13:07:22 -0400 |
parents | c792872f8942 |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/optimization/fminbnd.m +++ b/scripts/optimization/fminbnd.m @@ -49,7 +49,8 @@ ## This is patterned after opt/fmin.f from Netlib, which in turn is taken from ## Richard Brent: Algorithms For Minimization Without Derivatives, Prentice-Hall (1973) -## PKG_ADD: __all_opts__ ("fminbnd"); +## PKG_ADD: ## Discard result to avoid polluting workspace with ans at startup. +## PKG_ADD: [~] = __all_opts__ ("fminbnd"); function [x, fval, info, output] = fminbnd (fun, xmin, xmax, options = struct ())