Random Vector in decreasing order
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Matt J
le 29 Août 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Random Number Generation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!