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 = 

 quick
 brown
 fox  
 is   

--> cellstr(a)

ans = 

 ['quick']   
 ['brown']   
 ['fox']   
 ['is']   

--> 
quit