Convert cell array to two row vector
10 次查看(过去 30 天)
显示 更早的评论
Hi folks,
I have the following cell array:
hvix =
[2x1 double]
[2x8 double]
[2x15 double]
[2x1 double]
I want to concatenate them into a 2 x 25 matrix. Is this possible?
Thanks
0 个评论
采纳的回答
Andrei Bobrov
2018-9-11
cell2mat(hvix(:)')
2 个评论
monica padala
2021-4-8
Hi, I have the following cell array:
M =
[Ax1 double]
[Bx1 double]
[Cx1 double]
[Dx1 double]
[Ex1 double]
Is it possible to concatenate them into 5x4 matrix ?
output = [A B C D E] matrix
Andrei Bobrov
2021-4-9
M = arrayfun(@(x)rand(4,1),ones(5,1),'un',0)
out = [M{:}]'
更多回答(1 个)
另请参阅
类别
在 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!