find rows with all but one nonzero element
17 views (last 30 days)
Show older comments
Muhammad Ridwanur Rahim
on 21 May 2018
Commented: Muhammad Ridwanur Rahim
on 21 May 2018
hi,
after some calculation i get a matrix for example like this-
A=[1 0 1 1; 0 1 1 0; 1 0 1 0; 0 0 1 0]
now from A i want to output the row with all but one nonzero element
B=[0 0 1 0]
which will be the 4th row in this example.
how do i do it?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Logical 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!