feval
Evaluate function
Description
[ evaluates
a function using its name or its handle, and using the input arguments y1,...,yN] = feval(fun,x1,...,xM)x1,...,xM.
The feval function follows the same scoping and precedence rules as
calling a function handle directly. For more information, see Create Function Handle.
Examples
Input Arguments
Output Arguments
Tips
If you have a function handle, it is not necessary to use
fevalbecause you can invoke the function handle directly. The results of the following statements are equivalent.fh = @eig; [V,D] = fh(A) [V,D] = feval(@eig,A)
To evaluate a nested or local function using
feval, use a function handle instead of the function name. For more information, see Call Local Functions Using Function Handles.
Extended Capabilities
Version History
Introduced before R2006a