Determine which characters are spaces
Determine Which Characters of a String Are Spaces
In a Requirements Table block, create a requirement that outputs a
logical array determined by the string
y = isspace("Hello, world!")
str — Input string
Input string, specified as a string scalar. Enclose literal strings with double quotes.
tf — Whether each character is a space
Whether each character is a space, specified as a logical array. The elements in
tf are logical
1 where the corresponding
str are spaces, and logical
where the characters are not spaces.
This operator does not support the use of
Introduced in R2022b