repmat
repmat(A, m, n)
Input: A, m, n · Output: no output
What it is
Tiles A m times down and n times across: repmat([1, 2; 3, 4], 2, 3) is 4×6. repmat(A, n) is repmat(A, n, n) (MATLAB), repmat(A, [m, n]) also works. A bare Vec tiles as a row (like hstack), so repmat([1, 2], 1, 3) is [1, 2, 1, 2, 1, 2] and repmat([1, 2], 2, 1) is a 2×2 Mat; a scalar gives a Vec/Mat of copies; a string repeats (repmat("ab", 3) is "ababab"). Counts must be positive whole numbers, else an error; a complex array is an error.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
repmat(A, m, n) | A Vec or MatA bare Vec tiles as a row (like hstack), so repmat([1, 2], 1, 3) is [1, 2, 1, 2, 1, 2] and repmat([1, 2], 2, 1) is a 2×2 Mat.m —Tiles A m times down and n times across: repmat([1, 2.n —Tiles A m times down and n times across: repmat([1, 2. | not documented yet | Counts must be positive whole numbers, else an error; a complex array is an error. |
Examples
No documentation example calls this form yet. The Core maths chapter is where one belongs.