Problem 60929. Symmetric Pair

Given an (n, 2) matrix, remove any symmetric pairs from the matrix. Keep the first occurrence.
  • (2, 3) and (3, 2) are considered symmetric pairs.
For example,
x = [1,2;
2,1;
3,2;
4,3]
Here, the 1st and 2nd row are a symmetric pair => (1,2) and (2,1).
Keeping the first occurrence, the output should be -
out = [1,2;
3,2;
4,3]

Solution Stats

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Jun 12, 2025

Solution Comments

Show comments

Problem Recent Solvers6

Suggested Problems

More from this Author174

Community Treasure Hunt

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

Start Hunting!