<< Overview Low Discrepancy Tutorials >>

Low Discrepancy >> Low Discrepancy > lowdisc_ldgen

lowdisc_ldgen

Returns uniform numbers from a low discrepancy sequence.

Calling Sequence

u=lowdisc_ldgen(callf,n)
u=lowdisc_ldgen(callf,n,ldseq)

Parameters

callf :

a 1-by-1 matrix of floating point integers, the number of calls to the function.

n:

a 1-by-1 matrix of floating point integers, the spatial dimension.

ldseq :

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.

strict :

a 1-by-1 matrix of boolean, set to %f to use potentially favorable parameters (default = %t).

u :

a callf-by-n matrix of doubles, the uniform random numbers in [0,1]^n.

Description

In dimension n, this function generates callf experiments with the low discrepancy sequence ldseq.

Returns the numbers u in [0,1]^n.

Examples

// 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)

Authors


Report an issue
<< Overview Low Discrepancy Tutorials >>