Effacer les filtres
Effacer les filtres

transform 1x12 cell to 3x4 cell

1 vue (au cours des 30 derniers jours)
Alberto Acri
Alberto Acri le 23 Juin 2023
Hi! I have a cell like this:
A = {'5','11','69','85','114','169','188','196','250','258','267','295'};
I want to transform it like this:
A = {'5','11','69','85';'114','169','188','196';'250','258','267','295'};

Réponse acceptée

Dyuman Joshi
Dyuman Joshi le 23 Juin 2023
A = {'5','11','69','85','114','169','188','196','250','258','267','295'}
A = 1×12 cell array
{'5'} {'11'} {'69'} {'85'} {'114'} {'169'} {'188'} {'196'} {'250'} {'258'} {'267'} {'295'}
A = reshape(A,4,[])'
A = 3×4 cell array
{'5' } {'11' } {'69' } {'85' } {'114'} {'169'} {'188'} {'196'} {'250'} {'258'} {'267'} {'295'}

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by