Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2023.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Optimization and Simulation > Optimization base > optimbase_cget


Returns the value for the given key.

Calling Sequence

value = optimbase_cget(opt, key)



The object of TOPTIM type (tlist).


A string, the name of the key to quiery.


the value in fonction of the given key.


The optimbase_cget function returns the value contained in the key. If the key is unknown, this function generates an error.

To know the list of available keys, go to optimbase_configure help page.


opt = optimbase_new();

// Set number of variables
opt = optimbase_configure ( opt , "-numberofvariables" , 10);
nbvar = optimbase_cget(opt, "-numberofvariables")

// Set initial guess
opt = optimbase_configure(opt, "-x0", [-1.2 1.0]');
x0 = optimbase_cget(opt, "-x0")

// Set maximum number of iteration
opt = optimbase_configure(opt, "-maxiter", 200);
value = optimbase_cget(opt, "-maxiter")

opt = optimbase_destroy(opt);

See Also

Report an issue
<< Optimization base Optimization base optimbase_checkbounds >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Apr 01 10:13:56 CEST 2015