MATLAB Functions Help Desk

feval

Purpose

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    Assign value to variable in workspace

builtin     Execute builtin function from overloaded method

eval        Interpret strings containing MATLAB expressions

evalin      Evaluate expression in workspace.



[ Previous | Help Desk | Next ]