Main Content

net

Generate quasirandom point set

Description

example

X = net(p,n) returns the first n points from the point set p, which is either a haltonset or sobolset object. X is an n-by-d matrix, where d is the number of dimensions of the points in p.

The object p encapsulates properties of a specified quasirandom sequence. Values of the point set are generated whenever you access p using net or parenthesis indexing. Values are not stored within p.

Examples

collapse all

Generate a three-dimensional Halton point set, skip the first 1000 values, and then retain every 101st point.

p = haltonset(3,'Skip',1e3,'Leap',1e2)
p = 
Halton point set in 3 dimensions (89180190640991 points)

Properties:
              Skip : 1000
              Leap : 100
    ScrambleMethod : none

Apply reverse-radix scrambling by using scramble.

p = scramble(p,'RR2')
p = 
Halton point set in 3 dimensions (89180190640991 points)

Properties:
              Skip : 1000
              Leap : 100
    ScrambleMethod : RR2

Generate the first four points by using net.

X0 = net(p,4)
X0 = 4×3

    0.0928    0.6950    0.0029
    0.6958    0.2958    0.8269
    0.3013    0.6497    0.4141
    0.9087    0.7883    0.2166

Generate every third point, up to the eleventh point, by using parenthesis indexing.

X = p(1:3:11,:)
X = 4×3

    0.0928    0.6950    0.0029
    0.9087    0.7883    0.2166
    0.3843    0.9840    0.9878
    0.6831    0.7357    0.7923

Input Arguments

collapse all

Point set, specified as either a haltonset or sobolset object.

Example: haltonset(4)

Number of points to return from the point set, specified as a positive integer scalar. n must be between 1 and length(p), the number of points in p.

net always returns the first n points in p. To select a different set of n points from the quasirandom sequence, you can change p by using its Leap and Skip properties or the scramble object function. Alternatively, you can access points in p by using parenthesis indexing rather than the net object function.

Example: 1024

Data Types: single | double

Introduced in R2008a