putting columns together as a table
显示 更早的评论
Hi guys, I have got several variables: a, b, c, d, e. They are all cell arrays and consist of one column and several million rows. I want to put them together as one table. How can I do that? I want it in the following order: abcde.
Thanks
采纳的回答
更多回答(1 个)
Star Strider
2014-11-3
3 个投票
4 个评论
AA
2014-11-3
Star Strider
2014-11-3
Not really a problem.
Example:
a = {rand(5,1)};
b = {rand(7,1)};
z = {a b};
T = cell2table(z);
Mohammad Abouali
2014-11-3
编辑:Mohammad Abouali
2014-11-3
@StarRider: That doesn't actually work Here is the output
a = {rand(5,1)};
b = {rand(7,1)};
z = {a b};
T = cell2table(z);
>> T
T =
z1 z2
____________ ____________
[5x1 double] [7x1 double]
z would be a cell array with elements being cell array
Star Strider
2014-11-3
It works. That much is certain.
What we don’t yet know is if it meets AA’s requirements.
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!