Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

repmat

MATLAB repmat function


Description

Replicate and tile a matrix.

Usage

repmat(A, ...)

Arguments

A

vector or matrix to be tiled. Must be numeric, logical, complex or character.

...

numeric dimensions for the result

Value

Returns matrix with value A tiled to the number of dimensions specified. Defaults to square if dimension argument resolves to a single value.

Author(s)

See Also

Examples

repmat(1, 3)                       # same as ones(3)
repmat(1, c(3, 3))                 # same thing 
repmat(1, 3, 3)                    # same thing
repmat(1, size(matrix(NA, 3, 3)))  # same thing
repmat(matrix(1:4, 2, 2), 3)

matlab

MATLAB emulation package

v1.0.2
Artistic-2.0
Authors
P. Roebuck
Initial release
2014-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.