フィルターのクリア

remove rows with all zeros

216 ビュー (過去 30 日間)
Rahul
Rahul 2012 年 6 月 6 日
コメント済み: Shishir Bapat 2021 年 3 月 11 日
I have
a =
1 2 3
0 0 0
2 1 0
4 5 0
0 0 0
2 0 1
I need
b=
1 2 3
2 1 0
4 5 0
2 0 1

採用された回答

Walter Roberson
Walter Roberson 2012 年 6 月 6 日
b = a(any(a,2),:);
  5 件のコメント
Mohamed Nedal
Mohamed Nedal 2019 年 12 月 20 日
Hi Walter,
Would you please explain this line?
b = a(any(a,2),:);
Shishir Bapat
Shishir Bapat 2021 年 3 月 11 日
Thank you

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

その他の回答 (1 件)

Geoff
Geoff 2012 年 6 月 6 日
Search facility on Answers shows this question is asked a lot... Here's one of the more recent.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by