Hi all, I can't figure out how to remove duplicate rows from the matrix and go back to the original order of rows. Function "unique" with an option "r" sorts rows in lexicographic ascending order. Thanks in advance for any help, Iza