Load matrix from .mat files
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I've got ten .mat files (P0.mat,P1.mat,P2.mat,ecc) in each of them I have a 256 * 10 matrix, I want to read them and create a single 256 * 100 matrix, how can I do?
Thanks
Andrea
0 件のコメント
回答 (1 件)
Mathieu NOE
2021 年 10 月 14 日
hello
try this :
data_all = [];
for ci = 1:10
filename = ['P' num2str(ci-1) '.mat'];
data = load(filename);
data_all = [data_all data]; % horizontal concatenation
end
3 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!