Dear all,
Say I have three cells, where the element
dd = [49;50;51;52;53;54] [55;56;57] [85;86;87;88;89;90]
The objective is to extract all the element in each cell and make it into single row, such that
[40 50 51 52 53 54 55 56 57 85 86 87 88 89 90]
I used the following lines.
C =1for i =1:size(dd,2) Xcx = cell2mat (dd (1,i)); ee =[]ee (1,1: length (Xcx)) =Xcx;for k =1: length (ee ) new (C,1) = ee (k)C =C+1endend
Even though the code do the trick, I am looking if there is more advance and compact ways of doing it?
Thanks in advance
Best Answer