Determine which characters are letters
returns a Boolean array based on whether each character of
tf = isletter(
str is a
letter or not. Use this operator in the Requirements
Determine Which Characters of a String Are Letters
In a Requirements Table block, create a requirement that outputs a
logical array that indicates which characters in the string
world!" are letters.
y = isletter("Hello, world!")
str — Input string
Input string, specified as a string scalar. Enclose literal strings with double quotes.
tf — Whether each character is a letter
Whether each character is a letter, specified as a logical array. The elements in
tf are logical
1 where the corresponding
str are letters, and logical
where the characters are not letters.
This operator does not support the use of
Introduced in R2022b