Returns uniform numbers from a low discrepancy sequence.
u=lowdisc_ldgen(callf,n) u=lowdisc_ldgen(callf,n,ldseq)
a 1-by-1 matrix of floating point integers, the number of calls to the function.
a 1-by-1 matrix of floating point integers, the spatial dimension.
a 1-by-1 matrix of strings, the name of the sequence (default ldseq = "sobol"
). The name can be equal to : "halton"
, "halton-reverse"
, "faure"
, "sobol"
, "niederreiter"
, "halton-leaped"
, "halton-scrambled"
. See below for details.
a 1-by-1 matrix of boolean, set to %f to use potentially favorable parameters (default = %t).
a callf-by-n matrix of doubles, the uniform random numbers in [0,1]^n
.
In dimension n, this function generates callf
experiments with
the low discrepancy sequence ldseq
.
Returns the numbers u in [0,1]^n
.
"halton": the Halton sequence.
"halton-leaped": a leaped Halton sequence. For dimension less or equal to 999, the leap value is p-1, where p is the (dim+1)-th prime number. If not we return leap = 0.
"halton-scrambled": a scrambled Halton sequence, with the permutation used in Kocis and Whiten (RR2).
"faure": the Faure sequence.
"halton-reverse": the Reverse Halton sequence of Vandewoestyne and Cools.
"faure": the Faure sequence.
"niederreiter": the Niederreiter sequence with optimal base.
// Generate 20 points from a // fast Sobol sequence in dimension 2 u=lowdisc_ldgen(20,2 ) // Plot them scf(); plot(u(:,1),u(:,2),"bo") // Generate 20 points from a // fast Halton sequence in dimension 4 u=lowdisc_ldgen(20,4,"halton") // Generate 20 points from // the fast Faure sequence in dimension 4. u=lowdisc_ldgen(20,4,"faure") // Generate more than 20 points with potentially // favorable parameters [u,evalf]=lowdisc_ldgen(20,4,"faure",%f) | ![]() | ![]() |