フィルターのクリア

call certain rows to form a list

1 回表示 (過去 30 日間)
JL
JL 2019 年 8 月 2 日
コメント済み: JL 2019 年 8 月 2 日
Hi I have data below:
1 1 1 1 1
0 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 0 1 1 1
1 1 1 1 1
I want to call only those with 0s, meaning in my new list I have
0 1 1 1 1
1 0 1 1 1

採用された回答

Walter Roberson
Walter Roberson 2019 年 8 月 2 日
mask = ~all(YourArray,2);
subset = YourArray(mask,:);
  2 件のコメント
JL
JL 2019 年 8 月 2 日
Thank you very much Walter! I have another question, I was wondering if you could assist? - here is the link https://uk.mathworks.com/matlabcentral/answers/474657-assign-values-for-the-list-of-numbers-in-the-column-from-a-look-up-lable
JL
JL 2019 年 8 月 2 日
Hi Walter, just a quick query as a follow up to this question if I have matrix
ans =
0 1 1 1 1
0 1 1 0 1
1 1 1 0 1
1 1 1 0 1
0 1 1 1 1
and I just wanted to select the unique ones, means
ans =
0 1 1 1 1
0 1 1 0 1
1 1 1 0 1

サインインしてコメントする。

その他の回答 (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