Create an inline function from the character string str.
If called with a single argument, the arguments of the generated function
are extracted from the function itself. The generated function arguments
will then be in alphabetical order. It should be noted that i and j are
ignored as arguments due to the ambiguity between their use as a variable or
their use as an built-in constant. All arguments followed by a parenthesis
are considered to be functions. If no arguments are found, a function
taking a single argument named x
will be created.
If the second and subsequent arguments are character strings, they are the names of the arguments of the function.
If the second argument is an integer n, the arguments are
"x"
, "P1"
, …, "PN"
.
Programming Note: The use of inline
is discouraged and it may be
removed from a future version of Octave. The preferred way to create
functions from strings is through the use of anonymous functions
(see ‘Anonymous Functions’) or str2func
.
See also: argnames, formula, vectorize, str2func.
Package: octave