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.

 Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Abr. de 2015

Respondida:

el 29 de Abr. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by