Generating independent Halton sequences in same session

3 次查看(过去 30 天)
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)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by