Convert cell to table

4 次查看(过去 30 天)
Hi,
I have a 1 x 30 cell, A. Each element of A is a 1 x 10 double. How can I convert this to a 30 x 10 double, where each row is an element of cell A?
Any help would be appreciated! Thanks,
Sushma
  1 个评论
sushma sharma
sushma sharma 2016-9-28
cell2mat gives me a 1 x 300 double...how can i get it to be a 30 x 10 double...

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2016-9-28
See if the cell2mat function will do what you want.
  2 个评论
Star Strider
Star Strider 2016-9-28
sushma sharma’s Comment is duplicated here:
cell2mat gives me a 1 x 300 double...how can i get it to be a 30 x 10 double...
Star Strider
Star Strider 2016-9-28
Transpose your cell array first:
double_matrix = cell2mat(cell_array');
This uses the transpose operator (').

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2016-9-28
Star's answer gives you a double matrix. If you really want a "table" (if you even know what that is), use the function cell2table().

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by