Skip to content

cellstr

Convert a character array to a cell array of strings.

c = cellstr(s)

Splits a character matrix into a cell array, one cell per row, with trailing whitespace stripped from each row.

cellstr(['foo '; 'longer']) % {'foo'; 'longer'}
  • cell — Information about formatting, location, or contents of a cell.
  • char — Character with the given numeric code (Excel-compatible).
  • iscellstr — Test whether the input is a cell array of strings.