CELLSTR Convert character array to cell array of strings

Section: String Functions

Usage

The cellstr converts a character array matrix into a a cell array of individual strings. Each string in the matrix is placed in a different cell, and extra spaces are removed. The syntax for the command is
   y = cellstr(x)

where x is an N x M array of characters as a string.

Example

Here is an example of how to use cellstr
--> a = ['quick';'brown';'fox  ';'is   ']
a = 
  <string>  - size: [4 5]
 quick
 brown
 fox  
 is   
--> cellstr(a)
ans = 
  <cell array> - size: [4 1]
 
Columns 1 to 1
 quick    
 brown    
 fox    
 is