Cody

Solution 1692507

Submitted on 14 Dec 2018 by HH
  • Size: 9
  • This is the leading solution.
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 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In Epli_and_Tile (line 2) In ScoringEngineTestPoint1 (line 7) In solutionTest (line 3)]

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 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In Epli_and_Tile (line 2) In ScoringEngineTestPoint2 (line 12) In solutionTest (line 5)]

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 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In Epli_and_Tile (line 2) In ScoringEngineTestPoint3 (line 6) In solutionTest (line 7)]

Suggested Problems

More from this Author1