MATLAB Function Reference    
iskeyword

Test if string is a MATLAB keyword

Syntax

Description

iskeyword 's' returns a 1 if string, s, is a keyword in the MATLAB language. Returns 0, otherwise.

iskeyword returns a list of all MATLAB keywords.

R = iskeyword('s') returns a 1 in R if string, s, is a MATLAB keyword.

Examples

To test if the word while is a MATLAB keyword

To obtain a list of all MATLAB keywords

See Also

isvarname, is*


 isjava ismember