how to calculate no of 1 present in binary matrix in matalb
1 回表示 (過去 30 日間)
古いコメントを表示
how to calculate no of 1 present in binary matrix in matalb
0 件のコメント
回答 (1 件)
Azzi Abdelmalek
2014 年 3 月 15 日
編集済み: Azzi Abdelmalek
2014 年 3 月 15 日
not(A)
% Example
A=[1 0; 0 0]
B=not(A)
B=
[0 1
1 1]
% or maybe you mean number by no
out=sum(A(:))
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!