repeated sampling from sobol (or halton) sequence

7 views (last 30 days)
Hello
Very new to the idea of Quasi RN sampling. Starting point:
If I had to sample 20 times from the standard normal (5 random numbers at a time), I would just do this:
for i = 1: 20
x = randn(1, 1:5)
end
How would I do the same from a halton or sobol sequence?
I've been looking at the documentation.....not clear yet. I'm sure its staring at me....just a little help would be awesome!!
  2 Comments
Bharath Attoti
Bharath Attoti on 13 Dec 2022
Yes, I am not sure why but even a change in rng seed value does not seem to change the output point set of sobolset and haltonset. I remember getting diffirent results with change in seed in the 2017b version of Matlab. I have upgraded to version 2022b now. Is it the issue with the latest version? Which version are you using?

Sign in to comment.

Answers (1)

Chet Sharma
Chet Sharma on 18 Aug 2022
Looks like the answer may be much simpler:
x1 = RandStream('mt19937ar')
x1 =
mt19937ar random stream Seed: 0 NormalTransform: Ziggurat
x2 = randn(x1, 4, 1)
x2 = 4×1
0.5377 1.8339 -2.2588 0.8622

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!