This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Determine symbolic variables in expression


C = symvar(expr)



C = symvar(expr) searches the expression, expr, for identifiers other than i, j, pi, inf, nan, eps, and common functions. These identifiers are the names of variables in the expression. symvar returns the identifiers in a cell array of character vectors, C. If symvar finds no identifiers, then C is an empty cell array.


collapse all

Create a character vector that contains an expression. Find the identifiers in the expression and return them in a cell array.

C = symvar('cos(pi*x - beta1)')
C = 2x1 cell array
    {'x'    }

Input Arguments

collapse all

Input expression, specified as a character vector.

See Also

| |

Introduced before R2006a

Was this topic helpful?