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.

 채택된 답변

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Random Number Generation에 대해 자세히 알아보기

태그

질문:

2015년 4월 29일

답변:

2015년 4월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by