- Scilab help
- Scilab keywords
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 Object, external function or routine
External function or routine for use with specific commands.
An "external" is a function or routine which is used as an argument
of some high-level primitives (such as
The calling sequence of the external (function or routine) is imposed by the high-level primitive which sets the arguments of the external.
For example the external function
costfunc is an argument of the
primitive. Its calling sequence must be:
optim (the high-level optimization primitive) is invoked as follows:
costfunc (the cost function to be minimized by the primitive
g= gradient of
ind is an integer. Its use is precised in the
If other values are needed by the external function these variables can be defined in its environment. Also, they can be put in a list. For example,the external function
is valid for
optim if the external is
the call to
optim is then:
An external can also be a Fortran or C routine : this is convenient to speed up the computations.
The name of the routine is given to the high-level primitive as a character string. The calling sequence of the routine is also imposed.
External Fortran or C routines can also be dynamically linked (see
|<< exit||Scilab||extraction >>|