Spot the outlier - MATLAB Cody - MATLAB Central

Problem 661. Spot the outlier

Difficulty:Rate
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

24.93% Correct | 75.07% Incorrect
Last Solution submitted on May 06, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers466

Suggested Problems

More from this Author50

Community Treasure Hunt

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

Start Hunting!