Generating independent Halton sequences in same session

3 visualizaciones (últimos 30 días)
Snoopy
Snoopy el 25 de Ag. de 2021
I would like to create two Halton sequences which should be independent of each other. I use the code below. I am worried that the sequences might be correlated because the seed is the same for borh although I use different Skips and Leaps when creating the two sequences. I tried to use rng(1) and rng(2) before creating each sequence but that turned out to be a naive attempt because in one MATLAB session it is not possible to use different seeds with rng, if I am not mistaken. RandStream seemed to provide a solution but I cannot seem to difure out how I can combine it with the haltonset.
N = 100;
rng default
hal_a = haltonset(N,'Skip',1e3,'Leap',1);
hal_b = haltonset(N,'Skip',2e3,'Leap',2);
hal_a(1:5,1)
hal_b(1:5,1)

Respuestas (0)

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by