How to filter unwanted list from total list
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Mekala balaji
il 21 Mag 2016
Commentato: Walter Roberson
il 21 Mag 2016
Hi,
I have two tables 1. Total list, 2. Unwanted list. Now, I want to filter out the unwanted list from total list. The data is cell array.
Kindly some suggest me how to do this. Many thanks in advance.
Total list:
BG08HYK
VF8Y6K
VP0K86KL
VB180KET
VF07K6G
VA00KE
VF8Y6K
VP0K86KL
VB180KET
VF78KE9K
VP0K166KU
VB180KET
VF89K6G
VA00KE9K
Unwanted List:
VF07K6G
VF8Y6K
VF78KE9K
VB180KET
0 Commenti
Risposta accettata
Walter Roberson
il 21 Mag 2016
setdiff(TotalList, UnwantedList)
3 Commenti
Walter Roberson
il 21 Mag 2016
mask = any(ismember(TotalList, unwantedList),2);
row_index_to_remove = find(mask);
TotalList(mask,:) = [];
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Database Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!