How to filter a binary matrix through a binary vector?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Say I have a binary vector E and a binary matrix S,
E = [0 1 1 0 0]
S = [1 1 0 1 0; 1 1 1 1 1; 1 0 0 1 1]
I'm looking to find a matrix S_E that 'filters' the matrix S through the vector E, such that the new filtered matrix S_E only contains the placeholder values of the matrix S where there are 1's in the matrix E. So the matrix S_E would look like,
S_E = [1 0 ; 1 1 ; 0 0]
Is there any way to implement this?? Any help would be greatly appreciated.
Thanks!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!