- #1
roldy
- 237
- 2
Suppose I have a matrix of values v = [1 2; 3 6; 2 1; 6 7; 4 7; 8 5; 4 7; 2 10]
I need to be able to delete the duplicate rows where order does not matter. I should get left with v = [1 2; 3 6; 6 7; 4 7; 8 5; 2 10].
I'm having the hardest time figuring out a loop structure. In my previous attempts a tried to make two nested loops both going from 1:8. I tried to compare the inner loops wth row with the outer loop's qth row. If there's a match then I make the wth row = []. This does not work, since it does not take into account different orders of the row entries.
Any help would be appreciated.
I need to be able to delete the duplicate rows where order does not matter. I should get left with v = [1 2; 3 6; 6 7; 4 7; 8 5; 2 10].
I'm having the hardest time figuring out a loop structure. In my previous attempts a tried to make two nested loops both going from 1:8. I tried to compare the inner loops wth row with the outer loop's qth row. If there's a match then I make the wth row = []. This does not work, since it does not take into account different orders of the row entries.
Any help would be appreciated.