I have a sequence
A = 1:5
then I did its random permutation by
B = perms(A)
C = B(randperm(size(B,1)), :)
then I took a sample of 5 sequence randomly as follow
sample = C(1:5,1:4)
then I took a random sequence from sample as follow
randomRow = sample(randi(size(sample,1)),:)
I use the above random row for my operation. Now I am stuck how to select another row from a sample and do same operation on it, until I do operation on all rows in a sample and each row is not repeated from sample once it's processed.