How to filter unwanted list from total list
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2016-5-21
setdiff(TotalList, UnwantedList)
3 个评论
Walter Roberson
2016-5-21
mask = any(ismember(TotalList, unwantedList),2);
row_index_to_remove = find(mask);
TotalList(mask,:) = [];
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Acquisition Toolbox Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!