How to split one big matrix into several matrices?

I'm trying to split a 100000x2048 matrix into 100000 32x32x2 matrices and then put it into convolutional neural network as 100000 data set, could anyone help, please. Thank you.

 採用された回答

DGM
DGM 2021 年 8 月 9 日

1 投票

Consider:
A = rand(100E3,2048);
C = num2cell(A,2);
C = cellfun(@(x) reshape(x,32,32,2),C,'uniform',false);

3 件のコメント

KAI-YANG WANG
KAI-YANG WANG 2021 年 8 月 10 日
Thank you for responding, but when I input these 100000 sample data set into the convolutional neural network, the network still consider it is only one image, do you have any ideas on how to split these samples and make it like 100000 data. Thank you.
DGM
DGM 2021 年 8 月 11 日
I don't know anything about using a CNN, so I don't know what sort of datatype you need everything stored in. I imagine that getting it into a cell array would at least facilitate conversion to whatever you need though.
KAI-YANG WANG
KAI-YANG WANG 2021 年 8 月 11 日
I see, thank you so much though.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

2021 年 8 月 8 日

コメント済み:

2021 年 8 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by