MATLAB: Split the 132×10 cells into 1×10 arrays

arrays split

Hello everyone, I need to seek your guidance on how to split 132×10 cells into 1×10 arrays
This is important because in the next steps I need to compute the number of occurrences for each arrays.Thanks in advanced.

Best Answer

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
Related Question