tableにフィルターをかけて特定の行だけを抽出したい(Forを使わずに)
Show older comments
やりたいこと
9853 x 4の以下のtableがあります。
test =
ID value_a value_b value_c
1 8 9 4
2 5 7 2
3 7 9 3
4 8 1 2
5 3 9 6
. . . .
. . . .
9853 5 6 8
このtableから特定のIDを持つ行だけを抽出したいです。
たとえば、ID=1, 3の行を抽出する場合は、
ID value_a value_b value_c
1 8 9 4
3 7 9 3
としたいのです。
IDが2つであれば問題ありませんが、
多数のID、例えば
ID = 1, 5, 8, 9, 13, ...... 753, 986, ......1587, 1689, ...... 9850
といった数千以上のIDを持つ行だけを抽出したいです。
For文を使わずにスマートに抽出する方法はないでしょうか?
ご教示ください。
私の説明に不明な点があれば聞いてください。
よろしくお願いします。
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!