An inline function is created from a string containing the function
body using the
inline function. The following code defines the
function f(x) = x^2 + 2.
f = inline ("x^2 + 2");
After this it is possible to evaluate f at any x by
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 inbuilt
constant. All arguments followed by a parenthesis are considered
to be functions. If no arguments are found, a function taking a single
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
See also: argnames, formula, vectorize.
Return a cell array of character strings containing the names of the arguments of the inline function fun.
See also: inline, formula, vectorize.
Return a character string representing the inline function fun.
char (fun) is equivalent to
See also: argnames, inline, vectorize.
Identify the argument names in the function defined by a string.
Common constant names such as
j are ignored. The arguments that are
found are returned in a cell array of strings. If no variables are
found then the returned cell array is empty.