Are all the three given point in the same line? - MATLAB Cody - MATLAB Central

Problem 768. Are all the three given point in the same line?

Difficulty:Rate

In this problem the input is the coordinate of the three points in a XY plane?

P1(X1,Y1)

P2(X2,Y2)

P3(X3,Y3)

how can we find out if all the three points are on the same line or not?

for example the points (1,1) , (-1,-1) , (0,0) are on the line y=x.

Solution Stats

47.74% Correct | 52.26% Incorrect
Last Solution submitted on Jun 16, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
3
6

Problem Recent Solvers586

Suggested Problems

More from this Author11

Problem Tags

Community Treasure Hunt

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

Start Hunting!