formula

Return body of symbolic function

Description

example

formula(f) returns the body, or definition, of the symbolic function f.

Examples

collapse all

Return the body, or definition, of a symbolic function by using formula.

syms x y
f(x,y) = x + y;
formula(f)
ans =
x + y

If the symbolic function does not have a definition, formula returns the symbolic function.

syms g(x,y)
formula(g)
ans =
g(x, y)

Input Arguments

collapse all

Input specified as a symbolic function.

See Also

| | |

Introduced in R2012a