Cody

Solution 1578096

Submitted on 8 Jul 2018 by David Verrelli
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=[2.2 2.6 2.4 2.4 2.8 2.2 2.6 2.7 2.4 2.7 2.6 2.5 2.6 2.5 2.6 2.5 2.4 3.0]; mi=[2.7,2.8,3.0]; tmi=[4,2,6]; [m,tm]=data_process(x); assert(isequal(tm,tmi)&isequal(m,mi))

m = 2.7000 2.8000 3.0000 tm = 4 2 6

2   Pass
x=[2.2 2.6 2.4 2.4 2.8 2.2 2.6 7.7 2.4 9.7 2.6 2.5 2.6 2.5 2.6 2.5 2.4 7.0]; mi=[9.7,7.7,7.0]; tmi=[4,3,6]; [m,tm]=data_process(x); assert(isequal(tm,tmi)&isequal(m,mi))

m = 9.7000 7.7000 7.0000 tm = 4 3 6

3   Pass
x=[1.2 1.6 8.4 4.4 2.8 7.2 3.6 1.7 2.4 1.1 2.4 5.5 2.3 2.6 2.6 7.4 7.4 3.0]; mi=[7.4,7.4,8.4]; tmi=[6,6,1]; [m,tm]=data_process(x); assert(isequal(tm,tmi)&isequal(m,mi))

m = 7.4000 7.4000 8.4000 tm = 6 6 1

4   Pass
x=[2.1 6.6 3.5 4.7 8.2 4.5 6.3 7.1 2.5 8.1 4.4 3.7 5.2 3.7 1.6 1.3 7.1 1.0]; mi=[8.1,8.2,4.5]; tmi=[4,2,2]; [m,tm]=data_process(x); assert(isequal(tm,tmi)&isequal(m,mi))

m = 8.1000 8.2000 4.5000 tm = 4 2 2

5   Pass
x=[9.1 9.8 9.5 9.7 9.2 9.1 9.9 9.5 9.2 9.1 9.4 9.7 9.2 9.7 9.6 9.3 9.3 9.0]; mi=[9.9,9.8,9.7]; tmi=[3,1,4]; [m,tm]=data_process(x); assert(isequal(tm,tmi)&isequal(m,mi))

m = 9.9000 9.8000 9.7000 tm = 3 1 4

Suggested Problems

More from this Author27