How to combine two column data into one matrix?

For example, I have two column data:
A = [1;2;3];
B = [5;6;7];

In order to make a matrix with the first column being A and 2nd Column being B, I would do this in Matlab:
C = [A, B];

But it does it the wrong way and I got the below matrix instead:
[1, 2, 3]
[4, 5, 6]

How do I do this simple task?

Many thanks.

You want [A B], without the comma.

1 Like

Awesome. Many thanks for the quick reply!