Cody

Problem 661. Spot the outlier

All points except for one lie on a line. Which one is the outlier?

Example:

You are given a list of x-y pairs in a column like this:

 pts = [ 0 1 
         0 2 
         3 2
         0 3 
         0 4 ]

You would return the number 3, since the third point is the only one that is non-collinear with the other points. All the others are on the y-axis.

 outlier = 3

Solution Stats

32.66% Correct | 67.34% Incorrect
Last solution submitted on Aug 26, 2016

Problem Comments

Solution Comments

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more