check if two variables are not equal to zero.

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일

0 개 추천

ind=find(V==0)
size(ind)
OR
sum(V(:)==0) %this will give the number of zeros

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Variables에 대해 자세히 알아보기

제품

질문:

2014년 5월 21일

편집:

2014년 5월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by