Documentation Center

  • Trial Software
  • Product Updates

argnames

Input variables of symbolic function

Syntax

argnames(f)

Description

argnames(f) returns input variables of f.

Input Arguments

f

Symbolic function.

Examples

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]

See Also

| | |

Was this topic helpful?