Cody

Solution 2049743

Submitted on 7 Dec 2019 by Asif Newaz
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))

A = 2

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

b = 3 c = logical 0 A = 2 3

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

b = 3 c = logical 0 b = 2 2 c = 1×2 logical array 0 0 A = 2 3 4

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

b = 3 c = logical 0 b = 2 2 c = 1×2 logical array 0 0 b = 5 c = logical 0 A = 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))

b = 3 c = logical 0 b = 2 2 c = 1×2 logical array 0 0 b = 5 c = logical 0 b = 2 3 c = 1×2 logical array 0 0 b = 7 c = logical 1 a = 2 3 4 5 6 0 8 9 10 b = 2 2 2 c = 1×3 logical array 0 0 0 b = 3 3 c = 1×2 logical array 0 0 b = 2 5 c = 1×2 logical array 0 0 A = 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))

b = 3 c = logical 0 b = 2 2 c = 1×2 logical array 0 0 b = 5 c = logical 0 b = 2 3 c = 1×2 logical array 0 0 b = 7 c = logical 1 a = 2 3 4 5 6 0 8 9 10 11 12 13 14 15 16 17 b = 2 2 2 c = 1×3 logical array 0 0 0 b = 3 3 c = 1×2 logical array 0 0 b = 2 5 c = 1×2 logical array 0 0 b = 11 c = logical 1 a = 2 3 4 5 6 0 8 9 10 0 12 13 14 15 16 17 b = 2 2 3 c = 1×3 logical array 0 0 0 b = 13 c = logical 1 a = 2 3 4 5 6 0 8 9 10 0 12 0 14 15 16 17 b = 2 7 c = 1×2 logical array 0 1 a = 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 17 b = 3 5 c = 1×2 logical array 0 0 b = 2 2 2 2 c = 1×4 logical array 0 0 0 0 b = 17 c = logical 1 a = 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 A = 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))

b = 3 c = logical 0 b = 2 2 c = 1×2 logical array 0 0 b = 5 c = logical 0 b = 2 3 c = 1×2 logical array 0 0 b = 7 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Column 30 31 b = 2 2 2 c = 1×3 logical array 0 0 0 b = 3 3 c = 1×2 logical array 0 0 b = 2 5 c = 1×2 logical array 0 0 b = 11 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Column 30 31 b = 2 2 3 c = 1×3 logical array 0 0 0 b = 13 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Column 30 31 b = 2 7 c = 1×2 logical array 0 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Column 30 31 b = 3 5 c = 1×2 logical array 0 0 b = 2 2 2 2 c = 1×4 logical array 0 0 0 0 b = 17 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 19 20 21 22 23 24 25 26 27 28 29 30 Column 30 31 b = 2 3 3 c = 1×3 logical array 0 0 0 b = 19 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 21 22 23 24 25 26 27 28 29 30 Column 30 31 b = 2 2 5 c = 1×3 logical array 0 0 0 b = 3 7 c = 1×2 logical array 0 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 22 23 24 25 26 27 28 29 30 Column 30 31 b = 2 11 c = 1×2 logical array 0 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 0 23 24 25 26 27 28 29 30 Column 30 31 b = 23 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 0 0 24 25 26 27 28 29 30 Column 30 31 b = 2 2 2 3 c = 1×4 logical array 0 0 0 0 b = 5 5 c = 1×2 logical array 0 0 b = 2 13 c = 1×2 logical array 0 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 0 0 24 25 0 27 28 29 30 Column 30 31 b = 3 3 3 c = 1×3 logical array 0 0 0 b = 2 2 7 c = 1×3 logical array 0 0 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 0 0 24 25 0 27 0 29 30 Column 30 31 b = 29 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 0 0 24 25 0 27 0 0 30 Column 30 31 b = 2 3 5 c = 1×3 logical array 0 0 0 b = 31 c = logical 1 a = Columns 1 through 29 2 3 4 5 6 0 8 9 10 0 12 0 0 15 16 0 18 0 20 0 0 0 24 25 0 27 0 0 30 Column 30 0 A = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30

Suggested Problems

More from this Author2