在表中显示字符串

12个视图(30天)
Elysi科钦
Elysi科钦 2022年10月12日
第一行= {“a”“b”“c”' d '};
row2 = {' m ' ' n ' ' o ' ' p '};
varnames = {“Col1”“Col2”“Col3”“Col4”};
rownames = {第一行的“Row2”};
T = array2table([第一行;row2),“VariableNames”varnames,“RowNames”,rownames);
MyTable = T;
MyTable.Properties。VariableNames = T.Properties.VariableNames;
MyTable.Properties。RowNames = T.Properties.RowNames;
disp (MyTable);
的输出
Col1Col2Col3Col4
____________________
第一行{a}{b}{' c '}{' d '}
Row2{' m '}{' n '}{' o '}{' p '}
有可能显示表没有单引号和花括号吗
Col1Col2Col3Col4
____________________
第一行一个bcd
Row2nop

接受的答案

大卫。马塞罗说道
大卫。马塞罗说道 2022年10月12日
第一行= {“a”“b”“c”' d '};
row2 = {' m ' ' n ' ' o ' ' p '};
varnames = {“Col1”“Col2”“Col3”“Col4”};
rownames = {第一行的“Row2”};
T = array2table([第一行{:};row2 {}):,“VariableNames”varnames,“RowNames”,rownames);
MyTable = T;
MyTable.Properties。VariableNames = T.Properties.VariableNames;
MyTable.Properties。RowNames = T.Properties.RowNames;
disp (MyTable);
Col1 Col2 Col3 Col4 ____ ____上第一行a b c d Row2 m n o p
3评论

登录置评。

更多的答案(0)

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!