% Generate a matrix named foo
foo = randn(10000,2);% draw 1000 random samples
index = randsample(1:length(foo), 1000);bar = foo(index,:);
Suppose I have the code above, I only want to generate 1000 random rows once. I do not want a different set of 1000 random row everytime I run the program again. Please help. Thank you
Best Answer