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

2 views (last 30 days)
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.

Accepted Answer

Joseph Cheng
Joseph Cheng on 29 Apr 2015
that can be easily done with randperm(N,10) where N is the max number to be random.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!