v = symvar(expr)
| Parameter | Description |
|---|---|
| expr | Expression as text (character vector, string scalar) or a function handle. |
| Parameter | Description |
|---|---|
| v | Column cell array of variable names. |
symvar returns the names of the variables used in expr, sorted alphabetically and without duplicates.
Identifiers that resolve to a function or a builtin (including the special values pi, i, j, eps, Inf and NaN), language keywords and field access names are not reported as variables.
v = symvar('sin(x) + a*y')
| Version | Description |
|---|---|
| 2.0.0 | initial version |