Cody

Solution 1197294

Submitted on 25 May 2017 by DCN
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));

sub = 1 1 1 1 test = 1×0 empty double row vector

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

sub = [] test = []

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

sub = 0 0 0 0 test = 1 2 3 4

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

sub = 1 1 1 -7 test = 4

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

sub = -1 6 1 1 test = 1

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

sub = Columns 1 through 17 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 18 through 34 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 35 through 51 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 52 through 68 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 69 through 85 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 86 through 90 0.1000 0.1000 0.1000 0.1000 0.1000 test = 1×0 empty double row vector

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

sub = Columns 1 through 17 0.4712 0.6364 0.2405 -3.2031 4.3211 0.1805 0.4670 0.0914 0.6668 0.1484 0.6757 0.3902 0.7046 0.0725 0.1351 0.0318 0.3335 Columns 18 through 34 0.7277 0.7377 0.9736 0.1379 0.0838 0.9961 0.8121 0.4349 0.1254 0.4412 0.2571 0.9932 0.1824 0.4679 0.0807 0.2765 0.3393 Columns 35 through 51 0.8717 0.7236 0.7501 0.3993 0.2366 0.0034 0.6809 0.6537 0.2775 0.2263 0.5365 0.2060 0.0099 0.3896 0.1087 0.4881 0.9260 Columns 52 through 68 0.1565 0.7012 0.1736 0.4262 0.4014 0.8508 0.4776 0.6884 0.4815 0.4661 0.2628 0.7378 0.9447 0.6417 0.5661 0.4994 0.1336 Columns 69 through 85 0.6228 0.9960 0.9166 0.4140 0.9308 0.8874 0.0424 0.0410 0.0444 0.8336 0.4954 0.2855 0.9439 0.2302 0.2278 0.4104 0.8218 Columns 86 through 99 0.0165 0.6790 0.0538 0.6667 0.4155 0.9173 0.2080 0.1524 0.3183 0.0344 0.6239 0.7309 0.3988 0.0884 test = 4

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

sub = Columns 1 through 17 0.6369 0.3660 0.3381 0.7846 0.4001 0.8361 0.5676 0.5119 0.5579 0.8424 0.7986 0.6639 0.7932 0.4589 0.5279 0.1897 0.9000 Columns 18 through 34 0.3680 0.3875 0.8110 0.3567 0.6912 0.5842 0.9919 0.1646 0.1831 0.1028 0.0770 0.4007 0.5406 0.2990 0.0223 0.2125 0.8569 Columns 35 through 49 0.7025 0.6184 0.5539 0.7671 0.0886 0.9007 0.8777 0.7366 0.8904 0.3225 0.6676 0.1310 0.6516 0.4371 0.0437 test = 1×0 empty double row vector