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

11 Solutions

10 Solvers

Last Solution submitted on Jun 06, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers10

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!