repmat: Repeat Vectors and Matrices

Description Usage Arguments Value Examples

Description

Repeat a vector or matrix a specific number of times.

Usage

1
repmat(x, m, n)

Arguments

x

A vector or matrix.

m

Integer specifying how many times to repeat x in the first dimension.

n

Integer specifying how many times to repeat x in the second dimension.

Value

A block matrix of dimension m*nrow(x) by n*ncol(x).

Examples

1
2
repmat(1:3, 3, 2)  # will have dimension 9 by 2
repmat(randn(2, 2), 3, 2)

bgreenwell/ramify documentation built on May 12, 2019, 8:20 p.m.