Clear Filters
Clear Filters

how to merge two matrices

2 views (last 30 days)
Ede gerlderlands
Ede gerlderlands on 18 Nov 2012
I have two matrices with a= 20x6 and b=20x3 how can I merge them as 20x9.
thanks.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 18 Nov 2012
Edited: Azzi Abdelmalek on 18 Nov 2012
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]

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!