Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

symvar - Determine symbolic variables in expression

Syntax

symvar 'expr'
s = symvar('expr')

Description

symvar 'expr' searches the expression, expr, for identifiers other than i, j, pi, inf, nan, eps, and common functions. symvar displays those variables that it finds or, if no such variable exists, displays an empty cell array, {}.

s = symvar('expr') returns the variables in a cell array of strings, s. If no such variable exists, s is an empty cell array.

Examples

symvar finds variables beta1 and x, but skips pi and the cos function.

symvar 'cos(pi*x - beta1)'

ans = 

    'beta1'
    'x'

See Also

findstr

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS