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)
Show older comments
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.
0 Comments
Accepted Answer
Joseph Cheng
on 29 Apr 2015
that can be easily done with randperm(N,10) where N is the max number to be random.
0 Comments
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!