Hsiangsta
April 9th, 2008, 01:36 AM
Sup everyone!
I am trying to generate a set of random numbers B from a fixed set A = [1 2 3 4 5 6 7 8 9] in MATLAB with no repeats. So for example,
B = [3 2 4 7 1 8 9 6 5]
is one possibility. The trouble I am having is that I am not sure how to check that there are no repeats in set B.
Does anyone know how to solve this? Thanks a lot!
~Hsiang
I am trying to generate a set of random numbers B from a fixed set A = [1 2 3 4 5 6 7 8 9] in MATLAB with no repeats. So for example,
B = [3 2 4 7 1 8 9 6 5]
is one possibility. The trouble I am having is that I am not sure how to check that there are no repeats in set B.
Does anyone know how to solve this? Thanks a lot!
~Hsiang