Picking indices randomly
Ältere Kommentare anzeigen
Suppose I have a binary vector B of size n. I'd like to randomly pick the indices with value 1. How would one go about doing this?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Random Number Generation 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!