isvarname
Test whether a string is a valid variable name.
Syntax
Section titled “Syntax”tf = isvarname(str)Description
Section titled “Description”Returns true if str would be a valid variable identifier — starts with a letter, followed only by letters, digits, or underscores, AND is not a reserved keyword.
Examples
Section titled “Examples”isvarname('myVar') % 1isvarname('123abc') % 0 (starts with digit)isvarname('for') % 0 (keyword)