フィルターのクリア

How to trim down data?

1 回表示 (過去 30 日間)
AbelM Kusemererwa
AbelM Kusemererwa 2015 年 7 月 24 日
回答済み: Star Strider 2015 年 7 月 24 日
a=[1;2;3;44;15;6;7;82;9] , b=[1;2;3;3;3;3;1;3;3] and c=[14;28;36;44;5;6;12;21;19]. I would want use this selection criteria; select only the elements of b which are =3 and their corresponding values in a and c.
How can I trim this data down to a=[3;44;15;6;82;9], b=[3;3;3;3;3;3] and c=[36;44;5;6;21;19]?

採用された回答

Star Strider
Star Strider 2015 年 7 月 24 日
This works:
a=[1;2;3;44;15;6;7;82;9];
b=[1;2;3;3;3;3;1;3;3];
c=[14;28;36;44;5;6;12;21;19];
a3 = a(b == 3)
c3 = c(b == 3)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by