find rows with all but one nonzero element
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!