Hi,,I am trying to calculate the weight of a matrix.how can i do that> I am explaining below
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
the cyclist
on 31 May 2016
numberOfColumnsThatHaveExactlyOneOne = sum(sum(A==1)==1);
More Answers (0)
See Also
Categories
Find more on Matrix Decomposition in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!