I am not sure this works on Linux ...
10 Feb 2011
Random permutation of array elements, C-Mex: much faster than RANDPERM
Author: Jan Simon
I think there is a bug with the seeding. If I start up MATLAB fresh
a = Shuffle(1:100);
b = Shuffle(1:100);
all(a == b)
does not yield true.
Looking at the c code on line 174 kc is set equal to 7654321. I think this is part of the default seed when Shuffle first launches. On line 1062 kc is set equal to 698769069, which is part of the seed when the seed is reset.