Determine which characters are letters
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