Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Matt J
Posts:
4,988
Registered:
11/28/09
|
|
Re: Convert Cell Arrays to matrix array
Posted:
May 25, 2012 3:32 PM
|
|
"Matt J" wrote in message <jpolpm$b39$1@newscl01ah.mathworks.com>... > "Momo" wrote in message <jpokvn$790$1@newscl01ah.mathworks.com>... > > Hello, > > I want to convert cell arrays (A) that contain 1x1000 cell to a matrix, but when setting the command cell2mat, it gives me a message error "error at 47. All contents of the input cell array must be of the same data type". > > The cell array is constituted from 1000 <1x1 struct>, where each structure has: > > data <1024x1 double>; textdata <9x1 cell> ; colheaders <1x1 cell>. > > In other way, I want to extract the data <1024x1 double> from the 1000 cell and convert them into a matrix. > ================ > > > thematrix=[thestruct.data]; ==============
Forgot to add one thing.
thestruct=[thecell{:}]; thematrix=[thestruct.data];
|
|
|
|