split the 132x10 cells into 1x10 arrays

1 vue (au cours des 30 derniers jours)
Siti Suhaila
Siti Suhaila le 8 Août 2017
Commenté : Siti Suhaila le 8 Août 2017
Hello everyone, I need to seek your guidance on how to split 132x10 cells into 1x10 arrays
This is important because in the next steps I need to compute the number of occurrences for each arrays.Thanks in advanced.

Réponse acceptée

KSSV
KSSV le 8 Août 2017
nx = 1320 ; ny = 10 ;
%%Make a random data
A = cell(nx,ny) ;
for i = 1:nx
for j = 1:ny
A{i,j} = rand ;
end
end
%%split into 1x10 cell arrays
iwant = cell(nx,1) ;
for i = 1:nx
iwant{i,:} = [A{i,:}] ;
end
  1 commentaire
Siti Suhaila
Siti Suhaila le 8 Août 2017
TQ very much......

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays 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