isspace
Returns a boolean, logical matrix or cell array, whose value(s) are true if the corresponding elements of the input are whitespaces and false, if otherwise.
Syntax
R = isspace(s)
Inputs
- s
 - Type: Any finite scalar | string | mat | cell
 
Outputs
- R
 - Type: logical | mat | cell
 
Examples
String input:
R = isspace('test  123')
      R = [Matrix] 1 x 9
0  0  0  0  1  1  0  0  0
      R = isspace({23, ' test 123 '})R =
{
[1,1] 0
[1,2] [Matrix] 1 x 10
1  0  0  0  0  1  0  0  0  1
}