Cody

Solution 2108521

Submitted on 28 Jan 2020
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));

y = 0 1 2 3 4

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

y = 0

Assertion failed.

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

y = 0 0 0 0 0

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

y = -4 0 1 2 3

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

y = -4 -3 2 3 4

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

y = Columns 1 through 18 1.0000 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000 1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 2.4000 2.5000 2.6000 2.7000 Columns 19 through 36 2.8000 2.9000 3.0000 3.1000 3.2000 3.3000 3.4000 3.5000 3.6000 3.7000 3.8000 3.9000 4.0000 4.1000 4.2000 4.3000 4.4000 4.5000 Columns 37 through 54 4.6000 4.7000 4.8000 4.9000 5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000 5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 Columns 55 through 72 6.4000 6.5000 6.6000 6.7000 6.8000 6.9000 7.0000 7.1000 7.2000 7.3000 7.4000 7.5000 7.6000 7.7000 7.8000 7.9000 8.0000 8.1000 Columns 73 through 90 8.2000 8.3000 8.4000 8.5000 8.6000 8.7000 8.8000 8.9000 9.0000 9.1000 9.2000 9.3000 9.4000 9.5000 9.6000 9.7000 9.8000 9.9000 Column 91 10.0000

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

y = Columns 1 through 18 -1.0000 0.4291 1.2837 1.4463 2.2969 4.0388 4.9891 5.1295 5.2992 6.2621 7.1009 8.0879 8.2930 8.7031 8.7471 9.4159 9.9856 10.5463 Columns 19 through 36 10.6990 10.9745 11.4044 11.8624 12.1940 12.4425 12.7375 12.7700 13.2302 13.8609 14.2448 15.0057 15.5791 16.1349 16.9929 17.6226 18.1737 18.5837 Columns 37 through 54 19.3436 19.8767 20.0902 20.8486 21.6344 22.4079 23.3761 24.0578 24.5523 24.5892 24.6188 25.1512 25.9386 26.2834 27.2368 27.7234 27.9761 28.1811 Columns 55 through 72 29.0506 29.4050 29.8592 30.1705 30.4518 30.7739 31.5343 31.5656 32.1779 32.2010 32.8335 33.1588 33.4340 33.7207 33.8661 34.6793 34.7860 34.8014 Columns 73 through 90 35.4531 36.2416 36.4541 36.8840 37.0334 37.2748 37.7360 38.3804 39.3719 39.5630 40.4508 40.8355 41.4058 41.7761 42.1974 42.3955 43.2903 44.0549 Columns 91 through 100 44.7849 44.9951 45.0237 45.2820 45.6813 46.5343 46.7703 47.6699 48.1724 48.3265

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

y = Columns 1 through 18 0.2669 0.7254 1.7098 2.4610 2.8266 2.8360 3.0661 3.8258 4.0050 4.8730 5.1312 5.7566 6.2508 6.2882 7.0507 7.5651 8.5561 9.0215 Columns 19 through 36 9.9150 10.3657 10.7797 11.1529 11.4465 11.7904 12.7668 13.0500 13.6428 13.8540 14.2083 14.5856 15.0101 15.9297 16.5748 16.5950 16.6324 17.3591 Columns 37 through 50 18.2459 19.0030 19.0674 19.1098 19.8183 19.9105 20.1607 20.8342 21.1341 21.6756 22.0069 22.5518 22.8784 22.9610