How to take unique rows based on two columns

2 ビュー (過去 30 日間)
Mekala balaji
Mekala balaji 2018 年 7 月 5 日
コメント済み: Image Analyst 2018 年 7 月 8 日
Hi,
I have below previousDdata and currentData (cell matrix), and I want extract and add to currentData the unique rows based on column2 & column3(which does not exists in currentData) of previousData.
previousData:
Date PreName PostName score rank
2018-01-01 A V 12 23
2018-01-01 H Q 45 95
2018-01-02 B K 10 36
currentData:
Date PreName PostName score rank
2018-01-01 A V 12 23
2018-01-01 H Q 45 95
2018-05-12 P N 10 36
2018-06-14 X G 10 36
for example: row3 (B & K), does not exists in currentData, so I will retain it from previousData. My desired output is:
result:
Date PreName PostName score rank
2018-01-01 A V 12 23
2018-01-01 H Q 45 95
2018-05-12 P N 10 36
2018-06-14 X G 10 36
2018-01-02 B K 10 36
  1 件のコメント
Image Analyst
Image Analyst 2018 年 7 月 8 日
Please read this link and attach your table in a .mat file to make it easy for people to help you.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2018 年 7 月 5 日
Try findgroups().
By the way, a table is NOT a cell matrix. They are two totally different kinds of variables!
Oh, and also please read this link to learn how to format your questions so people can read them.

カテゴリ

Help Center および File ExchangeResampling Techniques についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by