Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

fp::expr_unapply

Create a functional expression from an expression

MuPAD® notebooks are not recommended. 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::expr_unapply(e, <x, …>)

Description

fp::expr_unapply(e,x) tries to interpret the expression e as a function in x and to return a functional expression computing that function.

fp::expr_unapply views the expression e as a function in the indeterminates x,... and tries to return a functional expression computing that function. If fp::expr_unapply cannot find a functional expression FAIL is returned.

If no indeterminates are given, any indeterminates of e found by indets are used.

Examples

Example 1

Get the functional expression computing sin(x):

fp::expr_unapply(sin(x), x)

fp::expr_unapply(sin(x[1]), x[1])

Example 2

Get the functional expression computing sin(x)^2+cos(x)^2:

fp::expr_unapply(sin(x)^2 + cos(x)^2)

Parameters

e

Expression

x

Identifier or indexed identifier

Return Values

Functional expression or FAIL.

See Also

MuPAD Functions

Was this topic helpful?