(Not recommended) Form blank-padded character array from strings
str2mat is not recommended. Use
S = str2mat(T1, T2, T3, ...)
S = str2mat(T1, T2, T3, ...) forms the character
S containing the character arrays
T1, T2, T3, ...
as rows. The function automatically pads each row with blanks in order to form a valid matrix.
Each input argument,
Ti, can itself be a character array with one or more
rows. This allows the creation of arbitrarily large character arrays. Empty character arrays
x = str2mat('36842', '39751', '38453', '90307'); whos x Name Size Bytes Class x 4x5 40 char array x(2,3) ans = 7
str2mat differs from
strvcat in that empty character
arrays produce blank rows in the output. In
strvcat, empty character arrays