<< Overview Low Discrepancy Sequences >>

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-leaped", "halton-scrambled", "halton-reverse", "faure", "sobol", "niederreiter". See below for details.

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

// See all projections of a 4D sequence.
u = lowdisc_ldgen ( 100 , 4 );
scf();
plotmatrix ( u )

Authors


Report an issue
<< Overview Low Discrepancy Sequences >>