The choice of seed value is arbitrary. It's not like a seed of 42 would make the array of pseudorandom numbers generated by the next call to rand / randn / randi / randperm "more random" or "less random" than a seed of 43. If you set the seed using rng to the same value and call the same random number function to generate the same number of pseudorandom numbers you'll get the same set of numbers.
rng(42)
x1 = rand(1, 10);
rng(42)
x2 = rand(1, 10);
isequal(x1, x2)
For your additional question, if exprnd calls rand, randn, randi, and/or randperm in the same order and with the same inputs each time you call it and doesn't change the random number stream inside itself (by calling rng or by explicitly creating a random number stream for its own use) yes, you can get reproducible results from exprnd. Looking at the exprnd code, it calls rand and performs a few computations using the numbers returned from that call. It doesn't change the random number stream inside.
rng(12345)
x1 = exprnd(0.5, 1, 10);
rng(12345)
x2 = exprnd(0.5, 1, 10);
isequal(x1, x2)
Best Answer