Transferring cell array elements into a matrix
2 次查看(过去 30 天)
显示 更早的评论
I have a cell array:
test_ca = {[1 2 3],[4 5 6];[7 8 9],[10 11 12]}
and i want to transfer these matrices in the cell array into a matrix where i would get:
new_mat = 1 2 3
4 5 6
7 8 9
10 11 12
however, i tried using cell2mat(test_ca) but ended up getting
new_mat = 1 2 3 4 5 6
7 8 9 10 11 12
0 个评论
采纳的回答
madhan ravi
2019-8-13
test_ca = {[1 2 3],[4 5 6];[7 8 9],[10 11 12]} .';
new_mat = cat(1,test_ca{:})
2 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!