How to concatenate two matrices

I need to concatenate two matrices
x=[ 1 2 3 4]
y=[5 6 7 8]
such that I get
z=[1 5 2 6 3 7 4 8]

2 Comments

Have you tried looking in the documentation for "concatenate"?
yes cat(2,x,y) gives me
ans=
1 2 3 4 5 6 7 8 and not
1 5 2 6 3 7 4 8

Sign in to comment.

 Accepted Answer

More Answers (0)

Categories

Products

Community Treasure Hunt

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

Start Hunting!