replace duplicate entry in columns
Ältere Kommentare anzeigen
if i have this matrix
2 6 5 1 3 3
3 8 2 3 5 6
6 3 1 4 2 6
4 6 6 4 3 4
I want to check for duplicate entries in each column, if there is an duplicate, i want to replace it with any random entry from the row where the duplicate is located. If no unique number can be found, replace it with 0. for example, column 4 has duplicate 4's in row 3 and 4, i want replace one with any other unidue number from the row. In this case, the only other unique number from row 4 is 6 because there is a 3 in column 4
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Library Development finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!