Cody

# Problem 43654. Replicate and Tile an Array

Solution 1878386

Submitted on 18 Jul 2019 by Sarah Walls
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
A = [1 2 3; 4 5 6; 7 8 9;] m = 1 n = 2 B_correct = [ 1 2 3 1 2 3; 4 5 6 4 5 6; 7 8 9 7 8 9]; assert(isequal(Epli_and_Tile(A,m,n),B_correct))

A = 1 2 3 4 5 6 7 8 9 m = 1 n = 2

2   Pass
A = magic(4); m = 2 n = 3 B_correct = [16 2 3 13 16 2 3 13 16 2 3 13; 5 11 10 8 5 11 10 8 5 11 10 8; 9 7 6 12 9 7 6 12 9 7 6 12; 4 14 15 1 4 14 15 1 4 14 15 1; 16 2 3 13 16 2 3 13 16 2 3 13; 5 11 10 8 5 11 10 8 5 11 10 8; 9 7 6 12 9 7 6 12 9 7 6 12; 4 14 15 1 4 14 15 1 4 14 15 1] assert(isequal(Epli_and_Tile(A,m,n),B_correct))

m = 2 n = 3 B_correct = 16 2 3 13 16 2 3 13 16 2 3 13 5 11 10 8 5 11 10 8 5 11 10 8 9 7 6 12 9 7 6 12 9 7 6 12 4 14 15 1 4 14 15 1 4 14 15 1 16 2 3 13 16 2 3 13 16 2 3 13 5 11 10 8 5 11 10 8 5 11 10 8 9 7 6 12 9 7 6 12 9 7 6 12 4 14 15 1 4 14 15 1 4 14 15 1

3   Pass
A = eye(2,3); m = 1 n = 5 B_correct = [1 0 0 1 0 0 1 0 0 1 0 0 1 0 0; 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0] assert(isequal(Epli_and_Tile(A,m,n),B_correct))

m = 1 n = 5 B_correct = 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0