Euler_Salter
Euler_Salter

Reputation: 3561

Julia: Transform Row vector to column Vector

How do I transform a row vector like the one above (1x3)

a = [1 2 3];

In to a column vector?

Upvotes: 6

Views: 2532

Answers (1)

Euler_Salter
Euler_Salter

Reputation: 3561

Found it! It's vec(). The reason why I couldn't find it is because I kept on looking for "row vector". Instead it's a 2D array.

Simply use vec(a) and it will be a standard column vector.

Upvotes: 6

Related Questions