This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test  Status  Code Input and Output 

1  Pass 
x = [0 1 2 3 4];
assert(isequal(mono_increase(x),true));
h =
0
h =
1
h =
2
h =
3
h =
4
tf =
logical
1

2  Pass 
x = [0];
assert(isequal(mono_increase(x),true));
h =
0
tf =
logical
1

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

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

5  Pass 
x = [3 4 2 3 4];
assert(isequal(mono_increase(x),false));
h =
0
tf =
logical
0

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

7  Pass 
x = cumsum(rand(1,100));
x(5) = 1;
assert(isequal(mono_increase(x),false));
h =
0
h =
1
h =
2
h =
3
tf =
logical
0

8  Pass 
x = cumsum(rand(1,50));
assert(isequal(mono_increase(x),true));
h =
0
h =
1
h =
2
h =
3
h =
4
h =
5
h =
6
h =
7
h =
8
h =
9
h =
10
h =
11
h =
12
h =
13
h =
14
h =
15
h =
16
h =
17
h =
18
h =
19
h =
20
h =
21
h =
22
h =
23
h =
24
h =
25
h =
26
h =
27
h =
28
h =
29
h =
30
h =
31
h =
32
h =
33
h =
34
h =
35
h =
36
h =
37
h =
38
h =
39
h =
40
h =
41
h =
42
h =
43
h =
44
h =
45
h =
46
h =
47
h =
48
h =
49
tf =
logical
1

given 3 sides, find area of this triangle
596 Solvers
363 Solvers
Getting the indices from a vector
1330 Solvers
159 Solvers
173 Solvers