Cody

Solution 1271527

Submitted on 19 Sep 2017 by safa osman
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
x = [0 1 2 3 4]; assert(isequal(mono_increase(x),true));

check = 0 check = 1 check = 2 check = 3

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

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

check = 0

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

check = 0 check = 1 check = 2 check = 3

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

check = -3

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

check = 1 check = 1.1000 check = 1.2000 check = 1.3000 check = 1.4000 check = 1.5000 check = 1.6000 check = 1.7000 check = 1.8000 check = 1.9000 check = 2 check = 2.1000 check = 2.2000 check = 2.3000 check = 2.4000 check = 2.5000 check = 2.6000 check = 2.7000 check = 2.8000 check = 2.9000 check = 3 check = 3.1000 check = 3.2000 check = 3.3000 check = 3.4000 check = 3.5000 check = 3.6000 check = 3.7000 check = 3.8000 check = 3.9000 check = 4 check = 4.1000 check = 4.2000 check = 4.3000 check = 4.4000 check = 4.5000 check = 4.6000 check = 4.7000 check = 4.8000 check = 4.9000 check = 5 check = 5.1000 check = 5.2000 check = 5.3000 check = 5.4000 check = 5.5000 check = 5.6000 check = 5.7000 check = 5.8000 check = 5.9000 check = 6 check = 6.1000 check = 6.2000 check = 6.3000 check = 6.4000 check = 6.5000 check = 6.6000 check = 6.7000 check = 6.8000 check = 6.9000 check = 7 check = 7.1000 check = 7.2000 check = 7.3000 check = 7.4000 check = 7.5000 check = 7.6000 check = 7.7000 check = 7.8000 check = 7.9000 check = 8 check = 8.1000 check = 8.2000 check = 8.3000 check = 8.4000 check = 8.5000 check = 8.6000 check = 8.7000 check = 8.8000 check = 8.9000 check = 9 check = 9.1000 check = 9.2000 check = 9.3000 check = 9.4000 check = 9.5000 check = 9.6000 check = 9.7000 check = 9.8000 check = 9.9000

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

check = 0.8147 check = 1.3388 check = 1.8988 check = 2.0791

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

check = 0.8055 check = 1.0055 check = 1.1737 check = 1.7989 check = 2.4283 check = 2.9583 check = 3.3624 check = 3.7603 check = 3.8626 check = 4.5526 check = 5.1248 check = 5.2988 check = 5.5874 check = 5.9495 check = 6.2895 check = 6.3151 check = 7.1767 check = 8.1493 check = 8.2865 check = 8.6435 check = 9.2244 check = 9.2364 check = 10.0946 check = 10.2847 check = 10.3967 check = 10.7148 check = 11.1392 check = 11.6672 check = 11.7352 check = 12.7352 check = 13.3944 check = 14.0663 check = 14.9460 check = 15.1948 check = 15.7601 check = 16.5863 check = 16.8009 check = 17.0102 check = 17.7973 check = 18.3413 check = 18.8706 check = 18.8943 check = 19.2287 check = 19.7417 check = 20.1417 check = 20.6734 check = 21.0680 check = 21.7374 check = 22.5738