필터 지우기
필터 지우기

How to find all zero values in a matrix?

조회 수: 235 (최근 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 CenterFile Exchange에서 Physics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by