Cody

Solution 2019097

Submitted on 14 Nov 2019 by Jack Noli
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 = randi(100); sz = [randi(100) 1]; B_correct = repmat(A,sz); assert(isequal(enlarge(A,sz),B_correct))

rows = 15 rows = 15 15 rows = 15 15 15 rows = 15 15 15 15 rows = 15 15 15 15 15 rows = 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 rows = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 B = 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 ...

2   Pass
A = randi(1000); sz = [1 randi(1000)]; B_correct = repmat(A,sz); assert(isequal(enlarge(A,sz),B_correct))

rows = 928 B = 928 B = 928 928 B = 928 928 928 B = 928 928 928 928 B = 928 928 928 928 928 B = 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Column 31 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 32 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 33 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 34 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 35 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 36 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 37 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 38 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 39 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 40 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 41 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 42 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 43 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 44 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 45 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 46 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 47 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 48 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 49 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 50 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 B = Columns 1 through 30 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 Columns 31 through 51 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928 928

3   Pass
A = eye(3); sz = [2 4]; B_correct = [1 1 1 1 0 0 0 0 0 0 0 0; 1 1 1 1 0 0 0 0 0 0 0 0; 0 0 0 0 1 1 1 1 0 0 0 0; 0 0 0 0 1 1 1 1 0 0 0 0; 0 0 0 0 0 0 0 0 1 1 1 1; 0 0 0 0 0 0 0 0 1 1 1 1]; assert(isequal(enlarge(A,sz),B_correct))

rows = 1 0 0 rows = 1 0 0 1 0 0 rows = 1 0 0 1 0 0 0 1 0 rows = 1 0 0 1 0 0 0 1 0 0 1 0 rows = 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 rows = 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 B = 1 1 0 0 0 0 B = 1 1 1 1 0 0 0 0 0 0 0 0 B = 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 B = 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 B = 1 1 1 1 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 B = 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 B = 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 B = 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 B = 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 B = 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 B = 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 B = 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

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

rows = 16 2 3 13 rows = 16 2 3 13 16 2 3 13 rows = 16 2 3 13 16 2 3 13 16 2 3 13 rows = 16 2 3 13 16 2 3 13 16 2 3 13 5 11 10 8 rows = 16 2 3 13 16 2 3 13 16 2 3 13 5 11 10 8 5 11 10 8 rows = 16 2 3 13 16 2 3 13 16 2 3 13 5 11 10 8 5 11 10 8 5 11 10 8 rows = 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 rows = 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 rows = 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 rows = 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 rows = 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 rows = 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 B = 16 16 16 5 5 5 9 9 9 4 4 4 B = 16 16 16 16 16 16 5 5 5 5 5 5 9 9 9 9 9 9 4 4 4 4 4 4 B = 16 16 16 16 16 16 16 16 16 5 5 5 5 5 5 5 5 5 9 9 9 9 9 9 9 9 9 4 4 4 4 4 4 4 4 4 B = 16 16 16 2 16 16 16 2 16 16 16 2 5 5 5 11 5 5 5 11 5 5 5 11 9 9 9 7 9 9 9 7 9 9 9 7 4 4 4 14 4 4 4 14 4 4 4 14 B = 16 16 16 2 2 16 16 16 2 2 16 16 16 2 2 5 5 5 11 11 5 5 5 11 11 5 5 5 11 11 9 9 9 7 7 9 9 9 7 7 9 9 9 7 7 4 4 4 14 14 4 4 4 14 14 4 4 4 14 14 B = 16 16 16 2 2 2 16 16 16 2 2 2 16 16 16 2 2 2 5 5 5 11 11 11 5 5 5 11 11 11 5 5 5 11 11 11 9 9 9 7 7 7 9 9 9 7 7 7 9 9 9 7 7 7 4 4 4 14 14 14 4 4 4 14 14 14 4 4 4 14 14 14 B = 16 16 16 2 2 2 3 16 16 16 2 2 2 3 16 16 16 2 2 2 3 5 5 5 11 11 11 10 5 5 5 11 11 11 10 5 5 5 11 11 11 10 9 9 9 7 7 7 6 9 9 9 7 7 7 6 9 9 9 7 7 7 6 4 4 4 14 14 14 15 4 4 4 14 14 14 15 4 4 4 14 14 14 15 B = 16 16 16 2 2 2 3 3 16 16 16 2 2 2 3 3 16 16 16 2 2 2 3 3 5 5 5 11 11 11 10 10 5 5 5 11 11 11 10 10 5 5 5 11 11 11 10 10 9 9 9 7 7 7 6 6 9 9 9 7 7 7 6 6 9 9 9 7 7 7 6 6 4 4 4 14 14 14 15 15 4 4 4 14 14 14 15 15 4 4 4 14 14 14 15 15 B = 16 16 16 2 2 2 3 3 3 16 16 16 2 2 2 3 3 3 16 16 16 2 2 2 3 3 3 5 5 5 11 11 11 10 10 10 5 5 5 11 11 11 10 10 10 5 5 5 11 11 11 10 10 10 9 9 9 7 7 7 6 6 6 9 9 9 7 7 7 6 6 6 9 9 9 7 7 7 6 6 6 4 4 4 14 14 14 15 15 15 4 4 4 14 14 14 15 15 15 4 4 4 14 14 14 15 15 15 B = 16 16 16 2 2 2 3 3 3 13 16 16 16 2 2 2 3 3 3 13 16 16 16 2 2 2 3 3 3 13 5 5 5 11 11 11 10 10 10 8 5 5 5 11 11 11 10 10 10 8 5 5 5 11 11 11 10 10 10 8 9 9 9 7 7 7 6 6 6 12 9 9 9 7 7 7 6 6 6 12 9 9 9 7 7 7 6 6 6 12 4 4 4 14 14 14 15 15 15 1 4 4 4 14 14 14 15 15 15 1 4 4 4 14 14 14 15 15 15 1 B = 16 16 16 2 2 2 3 3 3 13 13 16 16 16 2 2 2 3 3 3 13 13 16 16 16 2 2 2 3 3 3 13 13 5 5 5 11 11 11 10 10 10 8 8 5 5 5 11 11 11 10 10 10 8 8 5 5 5 11 11 11 10 10 10 8 8 9 9 9 7 7 7 6 6 6 12 12 9 9 9 7 7 7 6 6 6 12 12 9 9 9 7 7 7 6 6 6 12 12 4 4 4 14 14 14 15 15 15 1 1 4 4 4 14 14 14 15 15 15 1 1 4 4 4 14 14 14 15 15 15 1 1 B = 16 16 16 2 2 2 3 3 3 13 13 13 16 16 16 2 2 2 3 3 3 13 13 13 16 16 16 2 2 2 3 3 3 13 13 13 5 5 5 11 11 11 10 10 10 8 8 8 5 5 5 11 11 11 10 10 10 8 8 8 5 5 5 11 11 11 10 10 10 8 8 8 9 9 9 7 7 7 6 6 6 12 12 12 9 9 9 7 7 7 6 6 6 12 12 12 9 9 9 7 7 7 6 6 6 12 12 12 4 4 4 14 14 14 15 15 15 1 1 1 4 4 4 14 14 14 15 15 15 1 1 1 4 4 4 14 14 14 15 15 15 1 1 1

5   Pass
A = (-99:0)'; sz = [1 100]; B = enlarge(A,sz); assert(all(all(bsxfun(@minus,B,A)==0)))

rows = -99 rows = -99 -98 rows = -99 -98 -97 rows = -99 -98 -97 -96 rows = -99 -98 -97 -96 -95 rows = -99 -98 -97 -96 -95 -94 rows = -99 -98 -97 -96 -95 -94 -93 rows = -99 -98 -97 -96 -95 -94 -93 -92 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 -50 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -71 -70 -69 -68 -67 -66 -65 -64 -63 -62 -61 -60 -59 -58 -57 -56 -55 -54 -53 -52 -51 -50 -49 rows = -99 -98 -97 -96 -95 -94 -93 -92 -91 -90 -89 -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 -78 -77 -76 -75 -74 -73 -72 -...