What I\'m trying to accomplish is the following:
I wish to create a vector of integers, from a relatively small range, and ensure that none of the integers will be f
How this?
top = 5; count = 100; n1 = nan; out = []; for t = 1: count n2 = randi(top); while n1 == n2 n2 = randi(top); end out = [out, n2]; n1 = n2; end