Effacer les filtres
Effacer les filtres

convert cell array to matrix

5 vues (au cours des 30 derniers jours)
pavlos
pavlos le 1 Oct 2012
Hello,
Consider a cell array 300x1.
How can I create a matrix where the first 10 rows of the cell become the first row of the matrix, the 11th-20th rows become the second row, etc.
The resulting matrix should be 30x10.
Thsnk you.
Pavlos

Réponse acceptée

Jan
Jan le 1 Oct 2012
D = reshape(cat(1, C{:}), 10, [])
  1 commentaire
Andrei Bobrov
Andrei Bobrov le 1 Oct 2012
D = reshape(cat(1, C{:}), 10, []).'

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by