Cody

Solution 1967178

Submitted on 8 Oct 2019 by Iliane Hifi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
x = [0 1 2 3 4]; assert(isequal(mono_increase(x),true));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6

2   Pass
x = [0]; assert(isequal(mono_increase(x),true));

n = 1 n = 2

3   Pass
x = [0 0 0 0 0]; assert(isequal(mono_increase(x),false));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6

4   Pass
x = [0 1 2 3 -4]; assert(isequal(mono_increase(x),false));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6

5   Pass
x = [-3 -4 2 3 4]; assert(isequal(mono_increase(x),false));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6

6   Pass
x = 1:.1:10; assert(isequal(mono_increase(x),true));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6 n = 7 n = 8 n = 9 n = 10 n = 11 n = 12 n = 13 n = 14 n = 15 n = 16 n = 17 n = 18 n = 19 n = 20 n = 21 n = 22 n = 23 n = 24 n = 25 n = 26 n = 27 n = 28 n = 29 n = 30 n = 31 n = 32 n = 33 n = 34 n = 35 n = 36 n = 37 n = 38 n = 39 n = 40 n = 41 n = 42 n = 43 n = 44 n = 45 n = 46 n = 47 n = 48 n = 49 n = 50 n = 51 n = 52 n = 53 n = 54 n = 55 n = 56 n = 57 n = 58 n = 59 n = 60 n = 61 n = 62 n = 63 n = 64 n = 65 n = 66 n = 67 n = 68 n = 69 n = 70 n = 71 n = 72 n = 73 n = 74 n = 75 n = 76 n = 77 n = 78 n = 79 n = 80 n = 81 n = 82 n = 83 n = 84 n = 85 n = 86 n = 87 n = 88 n = 89 n = 90 n = 91 n = 92

7   Pass
x = cumsum(rand(1,100)); x(5) = -1; assert(isequal(mono_increase(x),false));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6 n = 7 n = 8 n = 9 n = 10 n = 11 n = 12 n = 13 n = 14 n = 15 n = 16 n = 17 n = 18 n = 19 n = 20 n = 21 n = 22 n = 23 n = 24 n = 25 n = 26 n = 27 n = 28 n = 29 n = 30 n = 31 n = 32 n = 33 n = 34 n = 35 n = 36 n = 37 n = 38 n = 39 n = 40 n = 41 n = 42 n = 43 n = 44 n = 45 n = 46 n = 47 n = 48 n = 49 n = 50 n = 51 n = 52 n = 53 n = 54 n = 55 n = 56 n = 57 n = 58 n = 59 n = 60 n = 61 n = 62 n = 63 n = 64 n = 65 n = 66 n = 67 n = 68 n = 69 n = 70 n = 71 n = 72 n = 73 n = 74 n = 75 n = 76 n = 77 n = 78 n = 79 n = 80 n = 81 n = 82 n = 83 n = 84 n = 85 n = 86 n = 87 n = 88 n = 89 n = 90 n = 91 n = 92 n = 93 n = 94 n = 95 n = 96 n = 97 n = 98 n = 99 n = 100 n = 101

8   Pass
x = cumsum(rand(1,50)); assert(isequal(mono_increase(x),true));

n = 1 n = 2 n = 3 n = 4 n = 5 n = 6 n = 7 n = 8 n = 9 n = 10 n = 11 n = 12 n = 13 n = 14 n = 15 n = 16 n = 17 n = 18 n = 19 n = 20 n = 21 n = 22 n = 23 n = 24 n = 25 n = 26 n = 27 n = 28 n = 29 n = 30 n = 31 n = 32 n = 33 n = 34 n = 35 n = 36 n = 37 n = 38 n = 39 n = 40 n = 41 n = 42 n = 43 n = 44 n = 45 n = 46 n = 47 n = 48 n = 49 n = 50 n = 51