Hi,,I am trying to calculate the weight of a matrix.how can i do that> I am explaining below
1 回表示 (過去 30 日間)
古いコメントを表示
Suppose I have a matrix...
A = [1 0 0 0 ;
1 1 0 0 ;
1 1 1 0 ;
1 1 1 1]
how do I calculate that how many coulmns have only one ONE ? TIA
0 件のコメント
採用された回答
the cyclist
2016 年 5 月 31 日
numberOfColumnsThatHaveExactlyOneOne = sum(sum(A==1)==1);
その他の回答 (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!