ISSPACE Test for Space Characters in a String

Section: String Functions

Usage

The isspace functions returns a logical array that is 1 for characters in the argument string that are spaces, and is a logical 0 for characters in the argument that are not spaces. The syntax for its use is
   x = isspace(s)

where s is a string. A blank character is considered a space, newline, tab, carriage return, formfeed, and vertical tab.

Example

A simple example of isspace:
--> isspace('  hello there world ')
ans = 
  <logical>  - size: [1 20]
 
Columns 1 to 20
 1  1  0  0  0  0  0  1  0  0  0  0  0  1  0  0  0  0  0  1