Ältere Kommentare anzeigen
重複したデータを削除する方法を教えてください。
具体的には下記のような処理を行いたいと考えています。
A = [600 142 30 75 13; 600 141 30 75 14; 600 142 30 80 14]
Aの5列目の値が他の行の5列目の値と重複している場合に、行数が小さいほうの行を削除したいです。
この場合は1行目と2行目の5列目の値が重複しているので、1行目を削除して、下記のBのような行列を求めたいと考えています。
B=[600 141 30 75 14; 600 142 30 80 14]
uniqueを使えばできそうなのですが、うまくいきません。
宜しくお願い致します。
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu ワークスペース変数と MAT ファイル 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!