fp::apply

Apply function to arguments

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

fp::apply(f, <e, …>)

Description

fp::apply(f,a) returns f(a).

fp::apply applies the function f to the arguments given by e, ....

Environment Interactions

Same side effects as when calling f(e,...) directly.

Examples

Example 1

Apply the function f to x and y:

fp::apply(f, x, y)

Example 2

Apply the functions of the first list to the arguments given by the second list:

zip([sin, cos], [x, y], fp::apply)

Parameters

f

Function

e

Object used as argument

Return Values

Result of the function call f(e,...).