Assuming that you want to fill it with a sequence of integers as your examples suggest, something like
[i for i=1:3, j=1] or reshape(1:3,3,1) would also work. Best, Tamas On Wed, Mar 04 2015, Deniz Yuret <[email protected]> wrote: > Is there a way to initialize a 2D column matrix? > a=[1,2,3] gives me a 1D vector with size=(3,) > a=[1;2;3] likewise > a=[1 2 3] gives me a row matrix with size=(1,3) > > How do I initialize a column matrix with size=(3,1)? (other than > transposing a row matrix)
