Random Vector in decreasing order
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to create the random column vector with 15 elements, they should be listed in decreased order.
I can create a random clumn vector and then I can sort it in decreased order but is it possible to create it sorted.
0 Kommentare
Akzeptierte Antwort
Matt J
am 29 Aug. 2022
There are alternatives to post-sorting, e.g. below, but no randomization function that will just spit out a sorted list.
cumsum(rand(15,1),'reverse')
0 Kommentare
Weitere Antworten (0)
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!