pick a random entry from a vector
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lou
am 28 Aug. 2015
Beantwortet: the cyclist
am 28 Aug. 2015
Hello, is there a matlab function that picks a random entry from a vector? I solved the problem with
i=randperm(length(vector),1),
entry=vector(i).
But i wondered if there is a more elegant solution. Thank you
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Random Number Generation 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!