feval
Evaluates the specified function with the given input(s).
Syntax
feval(func,A,...)
Inputs
- function
- Function, user made or built in, to be evaluated. Can be either the name of the function (string) or a handle to the function.
- A
- Arguments to be passed to the specified function.
Outputs
- R
- Result of evaluated function.
Examples
R = feval('sqrt',9)
R = 3
function z=testfunc(x, y)
z=x+y;
end
feval(@testfunc, 3, 4)
R = 7