Updates to the OptimizerFactory and the MatlabInterface. Better access to EvAClient.

This commit is contained in:
Marcel Kronfeld
2008-12-09 15:18:54 +00:00
parent c76f046faf
commit 245d8892ef
15 changed files with 433 additions and 145 deletions

View File

@@ -1,7 +1,25 @@
function int = setOptions(int, options)
% Set the optimization options for the interface.
function int = setOptions(int, usrOpts)
% Set the optimization options for the interface. The existing options are
% overwritten by the given setings.
% parameters:
% int: an interface instance
% options: an optimset instance
% usrOpts: a JE options structure
fn=fieldnames(usrOpts);
options = int.opts;
try
for i=1:length(fn)
% make sure all option fields and values are valid
% fn(i)
% ischar(fn(i))
makeOptions(int, char(fn(i)), usrOpts.(char(fn(i))));
options.(char(fn(i))) = usrOpts.(char(fn(i)));
end
catch ME
error('invalid option "%s"... check makeOptions to learn about available options', char(fn(i)));
end
int.opts = options;