How to divide a 4500x4500 matrix into smaller 36x36 matrices?

13 ビュー (過去 30 日間)
Daniel Tanner
Daniel Tanner 2019 年 8 月 2 日
コメント済み: Daniel Tanner 2019 年 8 月 2 日
I am currently carrying out some data analysis. I have a data set of 4500x4500 and I would like to split this into many squares of 36x36 for the whole data set. I understand this can be done using the mat2cell command but I cannot seem to understand how to correctly use it. Any help would be greatly appreciated. Thanks.

採用された回答

Alex Mcaulley
Alex Mcaulley 2019 年 8 月 2 日
Try this:
a = rand(4500);
b = mat2cell(a,36*ones(4500/36,1),36*ones(4500/36,1))
  1 件のコメント
Daniel Tanner
Daniel Tanner 2019 年 8 月 2 日
Yes this is exactly what I wanted, thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by