How to add labels to an array or table (after conversion from an array)
35 ビュー (過去 30 日間)
古いコメントを表示
I have an array of 2000 x 4 data points. I would like to add labels to the columns only. For example, Column 1 should be 'time/min', column 2 "FT_cor 15uL'", column 3 is 'time/min', and column 4 is "FT_cor 20uL'". I was trying to use array2table option but it apparently needs row labels as well. This was my syntax
CombinedArray=[Dataset_15uL, Dataset_20uL]; which is, say, 2000x4
colname= {'time/min'; 'FT_cor 15uL';'time/min'; 'FT_cor 20uL'};
Comb=array2table(CombinedArray,'VariableNames',colname);
The above syntax does not work (This is MATLAB 2017b). Thanks.
0 件のコメント
採用された回答
Akira Agata
2019 年 5 月 29 日
This is because some characters (such as '/' ) and white space ' ' are not allowed to use as variable names in table. Also, each variable name in one table should be unique. So, please revise the colname before making table Comb, like:
colname = {'time_min','FT_cor15uL','time_min2','FT_cor20uL'};
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!