Cody

Solution 204093

Submitted on 14 Feb 2013 by Frank
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));

f = 1 1 1 1 c = Empty matrix: 1-by-0 tf = 1

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

f = Empty matrix: 1-by-0 c = Empty matrix: 1-by-0 tf = 1

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

f = 0 0 0 0 c = 1 2 3 4 tf = 0

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

f = 1 1 1 -7 c = 4 tf = 0

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

f = -1 6 1 1 c = 1 tf = 0

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

f = Columns 1 through 10 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 11 through 20 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 21 through 30 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 31 through 40 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 41 through 50 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 51 through 60 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 61 through 70 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 71 through 80 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 Columns 81 through 90 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 c = Empty matrix: 1-by-0 tf = 1

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

f = Columns 1 through 10 0.4387 0.3816 0.7655 -2.6203 3.6023 0.4898 0.4456 0.6463 0.7094 0.7547 Columns 11 through 20 0.2760 0.6797 0.6551 0.1626 0.1190 0.4984 0.9597 0.3404 0.5853 0.2238 Columns 21 through 30 0.7513 0.2551 0.5060 0.6991 0.8909 0.9593 0.5472 0.1386 0.1493 0.2575 Columns 31 through 40 0.8407 0.2543 0.8143 0.2435 0.9293 0.3500 0.1966 0.2511 0.6160 0.4733 Columns 41 through 50 0.3517 0.8308 0.5853 0.5497 0.9172 0.2858 0.7572 0.7537 0.3804 0.5678 Columns 51 through 60 0.0759 0.0540 0.5308 0.7792 0.9340 0.1299 0.5688 0.4694 0.0119 0.3371 Columns 61 through 70 0.1622 0.7943 0.3112 0.5285 0.1656 0.6020 0.2630 0.6541 0.6892 0.7482 Columns 71 through 80 0.4505 0.0838 0.2290 0.9133 0.1524 0.8258 0.5383 0.9961 0.0782 0.4427 Columns 81 through 90 0.1067 0.9619 0.0046 0.7749 0.8173 0.8687 0.0844 0.3998 0.2599 0.8001 Columns 91 through 99 0.4314 0.9106 0.1818 0.2638 0.1455 0.1361 0.8693 0.5797 0.5499 c = 4 tf = 0

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

f = Columns 1 through 10 0.8530 0.6221 0.3510 0.5132 0.4018 0.0760 0.2399 0.1233 0.1839 0.2400 Columns 11 through 20 0.4173 0.0497 0.9027 0.9448 0.4909 0.4893 0.3377 0.9001 0.3692 0.1112 Columns 21 through 30 0.7803 0.3897 0.2417 0.4039 0.0965 0.1320 0.9421 0.9561 0.5752 0.0598 Columns 31 through 40 0.2348 0.3532 0.8212 0.0154 0.0430 0.1690 0.6491 0.7317 0.6477 0.4509 Columns 41 through 49 0.5470 0.2963 0.7447 0.1890 0.6868 0.1835 0.3685 0.6256 0.7802 c = Empty matrix: 1-by-0 tf = 1