Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
pts = [0 1; 0 2; 3 2; 0 3; 0 4 ];
outlier = 3;
assert(isequal(spot_the_outlier(pts),outlier))
ans =
5 3 4
3 1 2
3 2 4
ans =
3
|
2 | Pass |
%%
pts = [10 -1;7 0;9.5 0.3;9 1.6;8.5 2.9];
outlier = 2;
assert(isequal(spot_the_outlier(pts),outlier))
ans =
1 2 3
2 4 3
2 5 4
ans =
2
|
3 | Pass |
%%
pts = [-0.6 -6;-0.2 0;0 3;-0.8 -9;-2 1;-0.4 -3];
outlier = 5;
assert(isequal(spot_the_outlier(pts),outlier))
ans =
6 1 5
1 4 5
2 6 5
3 2 5
ans =
5
|
4 | Pass |
%%
pts = [2 5;0 4;0 0;4 6;-2 3];
outlier = 3;
assert(isequal(spot_the_outlier(pts),outlier))
ans =
3 5 2
3 1 4
3 2 1
ans =
3
|
5 | Pass |
%%
pts = [1 0; 0 1; 1 2; 1.5 2.5; 2 3; 3 4 ];
outlier = 1;
assert(isequal(spot_the_outlier(pts),outlier))
ans =
4 1 3
1 2 3
5 1 4
6 1 5
ans =
1
|
188 Solvers
Back to basics 3 - Temp Directory
328 Solvers
Sum of diagonal of a square matrix
1327 Solvers
Convert from Base 10 to base 5
203 Solvers
07 - Common functions and indexing 1
338 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!