isvarname
Tests if a string is a valid variable name.
Syntax
R = isvarname(A)
Inputs
- A
 - The string to be tested to determine if it is a valid variable name.
 
Outputs
- R
 - R is a logical value indicating whether A is a valid variable name. The variable does not have to be defined.
 
Examples
a = 5;
R = isvarname('a')R = 1R = isvarname('b') % b is not definedR = 1R = isvarname('32x')R = 0