Concatenate Cell array of doubles along rows
2 views (last 30 days)
Show older comments
Abdelrahman Abdeltawab
on 5 Nov 2016
Edited: Walter Roberson
on 5 Nov 2016
i have a cell array that looks like the following (4X2) in attached image
I want to concatenate adjacent values in rows
0 Comments
Accepted Answer
Walter Roberson
on 5 Nov 2016
arrayfun(@(COLIDX) vertcat(YourCell{:,COLIDX}), 1:size(YourCell,2), 'Uniform', 0)
4 Comments
Walter Roberson
on 5 Nov 2016
arrayfun(@(ROWIDX) vertcat(YourCell{ROWIDX,:}), (1:size(YourCell,1)).', 'Uniform', 0)
More Answers (1)
KSSV
on 5 Nov 2016
Let C be your cell array..
iwant{1} = [C{1,1} C{2,1}] ;
iwant{2} = [C{1,2} C{2,2}] ;
2 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!