Scilab 6.0.0
Aide de Scilab >> Fonctions avancées > deff
deff
on-line definition of function
Syntax
deff('[s1, s2, ...] = newfunction(e1, e2, ...)',text)
Arguments
- e1, e2, ...
input variables.
- s1, s2, ...
output variables.
- text
a matrix of character strings.
Description
deff
can be used to define functions from sequences of instructions
written in text strings. The resulting function object has the same properties
of any other function defined in a text file and loaded with exec
.
Quotes in the instructions (delimiting strings or meaning matrix transposition) have to be doubled to be interpreted correctly (see help quote). This can make writing up a little awkward.
Examples
deff('[x]=myplus(y,z)','x=y+z') deff('[x]=mymacro(y,z)',['a=3*y+1'; 'x=a*z+y'])
Comments
Add a comment:
Please login to comment this page.