How to filter data from table using multiple strings
显示 更早的评论
I have a table(60000 by 20) in which one of the columns have the following codes(extracted data):
c={'EGGD';'CSED';'CSED';'CSED';'CSED';'AVVT';'LBEB';'EGGD';'LBEB'}
And I just want the data that correspond to 'CSED' and 'AVVT'(example), there are many more.
One of my solutions:
cell=table2cell(table)
rowsCSED=any(strcmp(cell,'CSED'),2);
rowsAVVT=any(strcmp(cell,'AVVT'),2);
rows=rowsCSED | rowsAVVT;
table(rows,:)
Is there any way to do this without reverting to a loop?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!