필터 지우기
필터 지우기

check if two variables are not equal to zero.

조회 수: 6 (최근 30일)
Giuseppe
Giuseppe 2014년 5월 21일
편집: aneps 2014년 5월 21일
I have the vector e.g
A=10
B=4
C=0
D=4
V = [A,B,C,D]
How would I check if more than two values equal zero.

채택된 답변

aneps
aneps 2014년 5월 21일
편집: aneps 2014년 5월 21일
ind=find(V==0)
size(ind)
OR
sum(V(:)==0) %this will give the number of zeros

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by