How do I count the numbers of 0s and display the results?

Hi all,
How do I count the numbers of 0s in the results as shown below and display the results?
Thank you
Columns 1 through 12
0 0 0 0 0 0 0 0 0 0 0 0
Columns 13 through 20
0 0 0 0 0 0 0 0

 採用された回答

José-Luis
José-Luis 2012 年 10 月 14 日
編集済み: José-Luis 2012 年 10 月 14 日

0 投票

your_val = sum(your_mat(:)==0);

その他の回答 (1 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

Yao
2012 年 10 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by