Cody

Problem 44278. Find the outlier in a set of samples

Solution 3135011

Submitted on 9 Oct 2020
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   Fail
x = [ 3 4 71 8 10]; [p v]=outx(x); assert(p==3) assert(v==71)

Error using assert The condition input argument must be convertible to a scalar logical. Error in Test1 (line 3) assert(p==3)

2   Fail
x = [ 0 3 -7 -714 8 -10]; [p v]=outx(x); assert(p==4) assert(v== -714)

Error using assert The condition input argument must be convertible to a scalar logical. Error in Test2 (line 3) assert(p==4)

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!