How do i convert complex Cell array to a single array in matlab?

1 Ansicht (letzte 30 Tage)
ahmed obaid
ahmed obaid am 6 Apr. 2017
Kommentiert: ahmed obaid am 6 Apr. 2017
Dear experiences ..
i have a data stored in a cell array as an attached image, where the input of this cell array are changes from time to time according to some input data..
i need to convert this cell arrays to single matrix let us call it (master), which involve the following: first row involve the first dimension of every cell array as shown in the image, then the full cell arrays values , for example accord to attached image perhaps the output array involve :
first row= 5
second row ...to
6th row ...... involve cell array values (5 x 2229)
7th row= 6
8th row ...to
13th row= involve cell array values for second matrix (6 x 2229)
etc... for all cell arrays .
i would thanks any one can give me a solution for this issue ..
Note: the content of this cell array are changed according to size of input data.
thanks
  1 Kommentar
Jan
Jan am 6 Apr. 2017
In a matrix all rows have the same number of columns. Then the first row cannot be "5", when 2nd row contains 2229 columns.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 6 Apr. 2017
In a matrix all rows have the same number of columns. Then the first row cannot be "5", when 2nd row contains 2229 columns. You can create 2 arrays instead:
Len = cellfun('size', cent4printt, 1);
Data = cat(1, cent4printt{:});
  1 Kommentar
ahmed obaid
ahmed obaid am 6 Apr. 2017
very smart solution , only one request please... if its possible to separate every array by at least one empty row.. so i can recognize each array from others .. here all are in one array. thanks

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by