MATLAB Query ????? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

MATLAB Query ?????

How to eleminate duplicate combination pair from the 2D Matrix in MATLAB For example : 2D Matrix : 1234 1123 4321 1213 Output : 1234 1123 The combination {4321} and {1213} repeated in the matrix

10th May 2018, 11:40 AM
Rakesh Patil
Rakesh Patil - avatar
1 Answer
+ 2
I could imagine to use sort row-wise and by unique(..,'rows') or similar create a new matrix. Depending on your data it might also suffice to delete rows, where the sum is the same. But in this case e.g. 0004 and 1111 would be regarded as the same, so take care. For the actual syntax I'd have to check for myself, has been a long time since working with Matlab 😅
10th May 2018, 12:31 PM
Matthias
Matthias - avatar