Cody

Problem 42485. Eliminate Outliers Using Interquartile Range

Solution 2743210

Submitted on 27 Jul 2020 by Rafael S.T. Vieira
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
data = [53,55,51,50,60,52]; correct_data = [53,55,51,50,52]; assert(isequal(remove_outlier(data),correct_data))

2   Pass
data = [0,0,0,0,0]; correct_data = [0,0,0,0,0]; assert(isequal(remove_outlier(data),correct_data))

3   Pass
data = [1,2,3,4,5,100,100,6,7,8]; correct_data = [1,2,3,4,5,6,7,8]; assert(isequal(remove_outlier(data),correct_data))

4   Pass
data = [-54,-30,-45,-40,0,-33]; correct_data = [-54,-30,-45,-40,-33]; assert(isequal(remove_outlier(data),correct_data))

5   Pass
data = [63,64,64,63,53,61,65,63,52,50,65,61,68,137,62,60,64,67,65,63,63,63]; correct_data = [63,64,64,63,65,63,65,62,64,65,63,63,63]; assert(isequal(remove_outlier(data),correct_data))

6   Pass
data = [1,2,3,4,5,6,7]; correct_data = [1,2,3,4,5,6,7]; assert(isequal(remove_outlier(data),correct_data))

Suggested Problems

More from this Author1