Check if vertices form a rectangle - MATLAB Cody - MATLAB Central

Problem 2671. Check if vertices form a rectangle

Difficulty:Rate
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise.
X and Y are not necessarily in sorted order, but you may assume that X(i) is paired with Y(i).
Also, if computing distances in your solution (e.g. with pdist), it is recommended that you round to three decimal places.

Solution Stats

17.44% Correct | 82.56% Incorrect
Last Solution submitted on Jun 21, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers19

Suggested Problems

More from this Author44

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page