Cody

Solution 556199

Submitted on 12 Jan 2015 by Abdullah Caliskan
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
%% n = 2; A_correct = 2; assert(isequal(your_fcn_name(n),A_correct))

d = 1 2 M = [1] [2] ans = 2

2   Pass
%% n = 3; A_correct = [2 3]; assert(isequal(your_fcn_name(n),A_correct))

d = 1 2 3 M = [1] [2] [3] ans = 2 3

3   Pass
%% n = 4; A_correct = [2 3 4]; assert(isequal(your_fcn_name(n),A_correct))

d = 1 2 3 4 M = [1] [2] [3] [1x2 double] ans = 2 3 4

4   Pass
%% n = 5; A_correct = [2 3 4 5]; assert(isequal(your_fcn_name(n),A_correct))

d = 1 2 3 4 5 M = [1] [2] [3] [1x2 double] [5] ans = 2 3 4 5

5   Pass
%% n = 10; A_correct = [2 3 4 5 6 8 9 10]; assert(isequal(your_fcn_name(n),A_correct))

d = 1 2 3 4 5 6 7 8 9 10 M = Columns 1 through 9 [1] [2] [3] [1x2 double] [5] [1x2 double] [7] [1x3 double] [1x2 double] Column 10 [1x2 double] ans = 2 3 4 5 6 8 9 10

6   Pass
%% n = 17; A_correct = [2 3 4 5 6 8 9 10 12 15 16]; assert(isequal(your_fcn_name(n),A_correct))

d = Columns 1 through 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Column 17 17 M = Columns 1 through 9 [1] [2] [3] [1x2 double] [5] [1x2 double] [7] [1x3 double] [1x2 double] Columns 10 through 16 [1x2 double] [11] [1x3 double] [13] [1x2 double] [1x2 double] [1x4 double] Column 17 [17] ans = 2 3 4 5 6 8 9 10 12 15 16

7   Pass
%% n = 31; A_correct = [2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30]; assert(isequal(your_fcn_name(n),A_correct))

d = Columns 1 through 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Columns 17 through 31 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 M = Columns 1 through 9 [1] [2] [3] [1x2 double] [5] [1x2 double] [7] [1x3 double] [1x2 double] Columns 10 through 16 [1x2 double] [11] [1x3 double] [13] [1x2 double] [1x2 double] [1x4 double] Columns 17 through 23 [17] [1x3 double] [19] [1x3 double] [1x2 double] [1x2 double] [23] Columns 24 through 29 [1x4 double] [1x2 double] [1x2 double] [1x3 double] [1x3 double] [29] Columns 30 through 31 [1x3 double] [31] ans = Columns 1 through 16 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 Column 17 30