Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


fastmatrix (version 0.5-7721)

vec: Vectorization of a matrix

Description

This function returns a vector obtained by stacking the columns of \boldX.

Usage

vec(x)

Value

Let \boldX be a n by m matrix, then vec(\boldX) is a nm-dimensional vector.

Arguments

x

a numeric matrix.

Examples

Run this code
x <- matrix(rep(1:10, each = 10), ncol = 10)
x
y <- vec(x)
y

Run the code above in your browser using DataLab