Mercurial > hg > octave-lojdl
changeset 10060:8f51a90eb8d1
implement default opts query and register opts for qp
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 05 Jan 2010 07:28:42 +0100 |
parents | 665ad34efeed |
children | ec0c445d0d6f |
files | scripts/ChangeLog scripts/optimization/qp.m |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-01-05 Jaroslav Hajek <highegg@gmail.com> + + * optimization/qp.m: Supply default values on request and register + options. + 2010-01-05 John W. Eaton <jwe@octave.org> * qp.m: Allow linear term and constraint arguments to be
--- a/scripts/optimization/qp.m +++ b/scripts/optimization/qp.m @@ -98,10 +98,17 @@ ## @end table ## @end deftypefn +## PKG_ADD: __all_opts__ ("qp"); + function [x, obj, INFO, lambda] = qp (x0, H, varargin) nargs = nargin; + if (nargin == 1 && ischar (x0) && strcmp (x0, 'defaults')) + x = optimset ("MaxIter", 200); + return; + endif + if (nargs > 2 && isstruct (varargin{end})) options = varargin{end}; nargs--;