How to find all zero values in a matrix?
294 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Low-Level File I/O 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!