| MATLAB Function Reference | Search  Help Desk |
| feval | Examples See Also |
[y1,y2, ...] = feval(function,x1,...,xn)
[y1,y2...] = feval(function,x1, ...,xn)
If function is a string containing the name of a function (usually defined by an M-file), then feval(function,x1,...,xn) evaluates that function at the given arguments.
The statements:
[V,D] = feval('eig',A)
[V,D] = eig(A)
are equivalent. feval is useful in functions that accept string arguments specifying function names. For example, the function:
function plotf(fun,x) y = feval(fun,x); plot(x,y)can be used to graph other functions.
assignin Assign value to variable in workspace
builtin Execute builtin function from overloaded method
eval Interpret strings containing MATLAB expressions
evalin Evaluate expression in workspace