Getting unique values of an excel sheet relying on one column only.
1 回表示 (過去 30 日間)
古いコメントを表示
Please, I have an excel file with many rows and five columns. I need to remove the duplicated data of all columns considering the uniqueness of the last column only.
For example:( x,y,z,p,f) are columns
x y z p f
1 2 3 4 5
1 3 5 6 4
2 3 5 7 4
3 4 1 5 4
the result should be
1 2 3 4 5
1 3 5 6 4
Many thanks for help.
0 件のコメント
採用された回答
Andrei Bobrov
2016 年 9 月 4 日
z = [1 2 3 4 5
1 3 5 6 4
2 3 5 7 4
3 4 1 5 4];
[~,b] = unique(z(:,end),'stable');
out = z(b,:);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!