MATLAB Function Reference
  Go to function:
    Search    Help Desk 
feval    Examples   See Also

Function evaluation

Syntax

Description

[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.

Examples

The statements:

are equivalent. feval is useful in functions that accept string arguments specifying function names. For example, the function:

can be used to graph other functions.

See Also

assignin, builtin, eval, evalin



[ Previous | Help Desk | Next ]