How to concatenate selected data of two .mat files
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have two .mat files, named A.mat and B.mat. Those files have 1000 lines and 10 columns. they are both in format "Table".
I would like to create a new table, name C.mat, which is the file A.mat but has the last column of file B.mat added as an additional column.
Size(A.mat)=1000*10
Size(B.mat)=1000*10
Size(C.mat)=1000*11
The column 11 of the file C.mat is the column 10 of the file B.mat. The rest of the file C.mat is equal to the file A.mat
The file C.mat must be in the format double, as I have float numbers in all cells. Table2cell will do?
I thank you all in advance,
Best regards,
0 件のコメント
採用された回答
その他の回答 (1 件)
Image Analyst
2022 年 1 月 20 日
If t1 and t2 are your tables, how about just tacking on the right column?
t3 = [t1, t2(:, end)]
t1 and t2 both need to have the same number of rows. If not, look into the join() function.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!