How to find all zero values in a matrix?

48 vues (au cours des 30 derniers jours)
afrya
afrya le 12 Déc 2013
Commenté : Kaojie le 10 Mai 2024
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

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 12 Déc 2013
Modifié(e) : Azzi Abdelmalek le 12 Déc 2013
A=[1 0.1 1;2 0.7 0;3 0.9 2;4 1.7 0]
[ii,jj]=find(~A)
  7 commentaires
Zaid Al-Wardi
Zaid Al-Wardi le 9 Juin 2021
nice
Kaojie
Kaojie le 10 Mai 2024
Genius~

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Physics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by