Effacer les filtres
Effacer les filtres

How to split one big matrix into several matrices?

1 vue (au cours des 30 derniers jours)
KAI-YANG WANG
KAI-YANG WANG le 8 Août 2021
Commenté : KAI-YANG WANG le 11 Août 2021
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.

Réponse acceptée

DGM
DGM le 9 Août 2021
Consider:
A = rand(100E3,2048);
C = num2cell(A,2);
C = cellfun(@(x) reshape(x,32,32,2),C,'uniform',false);
  3 commentaires
DGM
DGM le 11 Août 2021
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 le 11 Août 2021
I see, thank you so much though.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by