| MATLAB Function Reference | ![]() |
Syntax
S = str2mat(T1,T2,T3,..)
Description
S = str2mat(T1,T2,T3,..)
把字串 T1,T2,T3,... 以列(row)的方式排列後寫入矩陣 S
。為了要形成合法的矩陣,會自動在每列短少的部分填入空白字元。每一個引數 Ti 可以自成為字串矩陣。 (這句不會翻)This allows the creation of arbitarily large string matrices.
空白字串也可以被指令接受。
Remarks
str2mat 和 strvcat 的不同處在於str2mat
的空字串會產生空白的列, strvcat 會省略空字串。
Examples
x = str2mat('36842','39751','38453','90307');
whos x
Name Size Bytes Class
x 4x5 40 char array
x(2,3)
ans =
7
See Also
| str2func | str2num | ![]() |