Please Help! How can I fill the 1x10 array with random integers but that the all integers would be different from each other?

Hello, Please help me with Matlab code for following task: I need to fill the 1x10 array with random integers but all integers must be different from each others. There must not be any same integers. Task seems to be easy but its actually not:(...I will appreciate any help. Thank you.

 Réponse acceptée

that can be easily done with randperm(N,10) where N is the max number to be random.

Plus de réponses (0)

Catégories

En savoir plus sur Random Number Generation dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by