Random Vector in decreasing order
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Matt J
il 29 Ago 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Random Number Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!