• incanter

1.2.3-SNAPSHOT

# vectorize

## incanter.core

• (vectorize mat)
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)

### Source incanter/core.clj:764 top

```(defn vectorize
" 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)
"
([mat]
(mapcat identity (trans mat))))```
Vars in incanter.core/vectorize: defn identity mapcat
Used in 0 other vars