how to merge two matrices
3 次查看(过去 30 天)
显示 更早的评论
I have two matrices with a= 20x6 and b=20x3 how can I merge them as 20x9.
thanks.
0 个评论
采纳的回答
Azzi Abdelmalek
2012-11-18
编辑:Azzi Abdelmalek
2012-11-18
Horizontal concatenation
c=[a b]
example
for horizontal concatenation
a=rand(20,6);
b=rand(20,3);
c=[a b]
for vertical concatenation
a=rand(6,20)
b=rand(3,20)
c=[a;b]
更多回答(0 个)
另请参阅
类别
在 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!