Returns the value for the given key.
value = optimbase_set(opt, key)
The object of TOPTIM type (tlist).
A string, the name of the key to set.
the value in function of the given key.
The optimbase_get
function returns the value for the given key.
If the key is unknown, this function generates an error.
The list of available keys is the same as the optimbase_set function:
The number of function evaluations is a 1-by-1 matrix of doubles, positive, integer value.
The number of iterations is a 1-by-1 matrix of doubles, positive, integer value.
The x optimum.
The optimum cost function value.
An array, with nbiter values, containing the history of x during the iterations.
This array is available after optimization if the history storing was enabled with
the -storehistory
option.
An array, with nbiter values, containing the history of the function value during the iterations.
This array is available after optimization if the history storing was enabled with
the -storehistory
option.
The function value for the initial guess.
A string containing the status of the optimization.
A 1-by-1 matrix of booleans. Set to %t when the logging is started up
(default -logstartup
= %f).
opt = optimbase_new(); // Set optimum opt = optimbase_set(opt,"-xopt",[1.0 1.0]) ; // Get optimum val = optimbase_get(opt, "-xopt") // Set function value at optimum opt = optimbase_set(opt,"-fopt",1.0); // Get function value at optimum val = optimbase_get(opt, "-fopt") // Set status opt = optimbase_set(opt,"-status","maxiter"); // Get status val = optimbase_get(opt, "-status") opt = optimbase_destroy(opt); | ![]() | ![]() |