How to find all zero values in a matrix?

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

 Accepted Answer

A=[1 0.1 1;2 0.7 0;3 0.9 2;4 1.7 0]
[ii,jj]=find(~A)

7 Comments

SIR, You absolutely nailed it.
genius...

Sign in to comment.

More Answers (0)

Categories

Find more on Simulation in Help Center and File Exchange

Asked:

on 12 Dec 2013

Commented:

on 10 May 2024

Community Treasure Hunt

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

Start Hunting!