I'm writing some code which takes 2-dimensional Julia arrays and converts
them to an external matrix type.

For example Mat([1 2; 3 4; 5 6]) creates a 3x2 matrix.

But I cannot figure out the syntax for nx1 arrays in Julia.

Note that I need to be able to construct nx1 and 1xn matrices.

I assumed the syntax would be [1 2 3] for 1x3 and [1; 2; 3] for 3x1. But
this doesn't seem to work, currently. It looks like the latter is a synonym
for [1, 2, 3], which makes no sense at all to me.

Also, what's with

julia> transpose(transpose([1; 2; 3])) == [1; 2; 3]
false

?

Reply via email to