delete matrix row with certain value

4 ビュー (過去 30 日間)
Patrick
Patrick 2014 年 11 月 11 日
コメント済み: Patrick 2014 年 11 月 11 日
how can i remove the rows with a certain number say, 2?

採用された回答

the cyclist
the cyclist 2014 年 11 月 11 日
M = magic(3);
M(any(M==2,2),:) = []
  1 件のコメント
Patrick
Patrick 2014 年 11 月 11 日
Thanks pal.

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

その他の回答 (1 件)

Adam
Adam 2014 年 11 月 11 日
A = [2 3 4 5; 6 7 8 9; 2 1 1 1; 3 3 3 3];
A( any(A == 2, 2 ),: ) = [];

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by