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]