www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CreateaStringfromValuesinCellArrayExample.m
%% Create Character Vector from Values in Cell Array C = { 1, 2, 3 ; 'AA','BB','CC'}; str = sprintf(' %d %s',C{:}) %% % The syntax |C{:}| creates a comma-separated list of arrays that contain % the contents of each cell from |C| in column order. For example, |C{1}==1| % and |C{2}=='AA'|.