extract submatrix from a large matrix using loop
古いコメントを表示
Dear friends, I have a matrix 1140 by 330. I have to split the matrix into 60 matrices with the size of 19*330 using a for loop. does any one know how to do that?
採用された回答
その他の回答 (2 件)
Andrei Bobrov
2016 年 7 月 18 日
A=rand(1140,330);
out = permute(reshape(A',size(A,2),60,[]),[2,1,3]);
Guillaume
2016 年 7 月 18 日
m = rand(1140, 330); %demo matrix
splitm = mat2cell(m, ones(1, 60) * 19, 330)
カテゴリ
ヘルプ センター および 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!