argnames

Input variables of symbolic function

Description

example

argnames(f) returns input variables of f.

Examples

Find Input Variables of Symbolic Function

Create this symbolic function:

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

Use argnames to find input variables of f:

argnames(f)
ans =
[ x, y]

Create this symbolic function:

syms f(a, b, x, y)
f(x, b, y, a) = a*x + b*y;

Use argnames to find input variables of f. When returning variables, argnames uses the same order as you used when you defined the function:

argnames(f)
ans =
[ x, b, y, a]

Input Arguments

collapse all

Input, specified as a symbolic function.

See Also

| | |

Introduced in R2012a