concatenate mutiple tables by repetative process
1 次查看(过去 30 天)
显示 更早的评论
Hello
I have a very large number of individual tables at my workspace, and I would like to concatenate them into a larger one by vertically combining all of them.
I have seen vertcat but i think it doesn't do so many repetition
The form of the final table is supposed to be =[A;B;...;n], does any body know of a way to automatically concatenate them.
regards
George
采纳的回答
Jos (10584)
2013-10-16
How are these tables stored in your workspace? Do they all have an individual name (like Table1, MyOtherTable, B, DDDDD, ...)? Can you somehow generate these table differently, so they are all stored in a cell array or an array of structs? Then it would be easy, making use of comma-separated list expansion :
% cell array example
C{1} = rand(3,4) ;
C{2} = ones(2,4) ;
C{3} = zeros(4,4) ;
vertcat(C{:})
% structure array example
S(1).data = rand(2,3) ;
S(2).data = zeros(3,3) ;
S(3).data = ones(1,3) ;
vertcat(S.data)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!