How to find all zero values in a matrix?

66 ビュー (過去 30 日間)
afrya
afrya 2013 年 12 月 12 日
コメント済み: Kaojie 2024 年 5 月 10 日
Hello,
I am wondering first how can I do to detect the number of zero values and their position in a large matrix.Secondly, how can i delete it.
Exemple:
A=
1 0,1 1
2 0.7 0
3 0.9 2
4 1.7 0
Number of zero values:2
position: A(2,3);A(4,3)
Thanks in advance

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 12 日
編集済み: Azzi Abdelmalek 2013 年 12 月 12 日
A=[1 0.1 1;2 0.7 0;3 0.9 2;4 1.7 0]
[ii,jj]=find(~A)
  7 件のコメント
Zaid Al-Wardi
Zaid Al-Wardi 2021 年 6 月 9 日
nice
Kaojie
Kaojie 2024 年 5 月 10 日
Genius~

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by