Returns the vectorization (i.e. vec) of the given matrix.

The vectorization of an m-by-n matrix A, denoted by vec(A)

is the m*n-by-1 column vector obtain by stacking the columns

of the matrix A on top of one another.

For instance:

(= (vectorize (matrix [[a b] [c d]])) (matrix [a c b d]))

Examples:

(def A (matrix [[1 2] [3 4]]))

(vectorize A)

References:

http://en.wikipedia.org/wiki/Vectorization_(mathematics)

## Comments top

## No comments for

vectorize. Log in to add a comment.