Concatenate Cell array of doubles along rows
3 次查看(过去 30 天)
显示 更早的评论
i have a cell array that looks like the following (4X2) in attached image
I want to concatenate adjacent values in rows
0 个评论
采纳的回答
Walter Roberson
2016-11-5
arrayfun(@(COLIDX) vertcat(YourCell{:,COLIDX}), 1:size(YourCell,2), 'Uniform', 0)
4 个评论
Walter Roberson
2016-11-5
arrayfun(@(ROWIDX) vertcat(YourCell{ROWIDX,:}), (1:size(YourCell,1)).', 'Uniform', 0)
更多回答(1 个)
KSSV
2016-11-5
Let C be your cell array..
iwant{1} = [C{1,1} C{2,1}] ;
iwant{2} = [C{1,2} C{2,2}] ;
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!