str2mat
Returns a string matrix, R, whose elements are inputs, s, vertically concatenated. Strings that form the rows R are padded with spaces so that R is valid.
Syntax
R = str2mat(s,...)
Inputs
- s
 - s must be a string or cell array of strings.
 
Outputs
- R
 - Type: string | mat
 
Examples
R = str2mat('This', 'is', 'vertically', 'concatenated')R =
This
is
vertically
concatenatedR = str2mat(75, 'char example',  {'Cell element 1', 'Cell element 2'}, [65;66;67], [65,66,67])R =
K
char example
Cell element 1
Cell element 2
A
B
C
ABC