www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ConvertCellArrayofStringstoCharacterArrayExample.m
%% Convert Cell Array to Character Array % Convert a cell array of character vectors into a character array. %% A = {'ABCD','efghijk','','LM'}; S = char(A) %% % Because the character vectors from cell array |A| have different lengths, % |char| pads |S| with blanks where needed. |char| pads the third row with seven % blanks, because the third cell of |A| contains an empty character array. whos S