Replicate columns of input matrix n times as neighbors of columns in original matrix.

interleaveMatrixWithItself(x, n = 1)

Arguments

x

input matrix

n

number of interleaves

Value

matrix is output

Author

Avants BB

Examples


mat <- replicate(100, rnorm(20))
wmat <- interleaveMatrixWithItself(mat, 5)