combine each 8 matrices in a cell array
1 回表示 (過去 30 日間)
古いコメントを表示
I have a cell array that contain matrices of the same dimentions. I want an effictive way to combine each 8 matrices together in one matrix. Any ideas?
0 件のコメント
採用された回答
Image Analyst
2020 年 3 月 8 日
How about just a loop? Assuming a 1-D cell array
caOut = cell(length(ca)/8, 1); % New cell array for the output
counter = 1;
for k = 1 : 8 : length(ca)
% Put 8 cells of ca into one cell of caOut.
caOut(counter) = {[ca{k}, ca{k+1}, ca{k+2}, ca{k+3}, ca{k+4}, ca{k+5}, ca{k+6}, ca{k+7}]}
counter = counter + 1;
end
その他の回答 (0 件)
参考
カテゴリ
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!