Learn R Programming

ANTsR (version 0.3.3)

interleaveMatrixWithItself: Simple interleaveMatrixWithItself function.

Description

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

Usage

interleaveMatrixWithItself(x, n = 1)

Arguments

x
input matrix
n
number of interleaves

Value

matrix is output

Examples

Run this code

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

Run the code above in your browser using DataLab