generating a randon vector withou repeating any number
Afficher commentaires plus anciens
Hello, Someone can help me with the following question? I want to generate a randon vector (1x17) where the number range are 1 to 18, but i don't want to repeat any of these numbers.
Thanks!!
Réponses (1)
Thorsten
le 2 Déc 2015
x = randperm(18, 17);
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!