How to randomly select a seq of numbers and if duplicate in seq delete and repick

1 view (last 30 days)
hi guys i have a simple question. I want to select 3 numbers randomly in a matrix A(1x3) form. if the three numbers are similar to each other - throw away and repopulate the matrix A.if the three numbers are unique then add to an empty matrix B of size 50. so basically fill an empty matrix B of size 50x3 with unique three number rows. how can this be achieved. thank you in advance. cheers
  2 Comments
James Tursa
James Tursa on 4 Jun 2015
What is the desired distribution of the numbers in the rows? Uniform(0,1)? Integers from 1 to n for some number n? Or what?
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh on 4 Jun 2015
Ashan you just asked a similar question! I guess it was yesterday, I believe you got a concrete answer as well!

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!