feval
Evaluates function.
📝Syntax
feval(function_name; x1, ..., xn)
feval(function_handle; x1, ..., xn)
[r1, ..., rn] = feval(function_name, x1, ..., xn)
[r1, ..., rn] = feval(function_handle, x1, ..., xn)
📥Input Arguments
Parameter Description
function_name a string: function name.
function_handle a function handle.
x1, ..., xn input arguments of the function.
📤Output Arguments
Parameter Description
r1, ..., rn output arguments returned by the function
📄Description

function calls the base function or built-in described by its name or function handle and input arguments.

💡Examples
a = feval('cos', 0)
b = feval(str2func('cos'), 0)
🔗See Also
builtinfunc2str
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub