repeated sampling from sobol (or halton) sequence

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 commentaires

Still searching....I tried the following code. What I'm not able to understand is how to change the result of the test2 variable....how do I make it change for each iteration? The code here doesn't quite do it....
for i = 1 : 10
test = haltonset(1000, 'skip', i);
test = scramble(test, 'RR2');
test2 = net(test, 5);
end
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?

Connectez-vous pour commenter.

Réponses (1)

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

Produits

Version

R2022a

Question posée :

le 18 Août 2022

Commenté :

le 13 Déc 2022

Community Treasure Hunt

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

Start Hunting!

Translated by