Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Convert Cell Arrays to matrix array
Replies: 3   Last Post: May 25, 2012 4:07 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt J

Posts: 4,976
Registered: 11/28/09
Re: Convert Cell Arrays to matrix array
Posted: May 25, 2012 3:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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];



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.