| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
Scramble quasi-random point set
ps = scramble(p,type)
ps = scramble(p,'clear')
ps = scramble(p)
ps = scramble(p,type) returns a scrambled copy ps of the point set p of the qrandset class, created using the scramble type specified in the string type. Point sets from different subclasses of qrandset support different scramble types, as indicated in the following table.
| Subclass | Scramble Types |
|---|---|
| haltonset class | 'RR2' — A permutation of the radical inverse coefficients derived by applying a reverse-radix operation to all of the possible coefficient values. The scramble is described in [1]. |
| sobolset | 'MatousekAffineOwen' — A random linear scramble combined with a random digital shift. The scramble is described in [2] |
ps = scramble(p,'clear') removes all scramble settings from p and returns the result in ps.
ps = scramble(p) removes all scramble settings from p and then adds them back in the order they were originally applied. This typically results in a different point set because of the randomness of the scrambling algorithms.
Use haltonset to generate a 3-D 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 (8.918019e+013 points)
Properties:
Skip : 1000
Leap : 100
ScrambleMethod : noneUse scramble to apply reverse-radix scrambling:
p = scramble(p,'RR2')
p =
Halton point set in 3 dimensions (8.918019e+013 points)
Properties:
Skip : 1000
Leap : 100
ScrambleMethod : RR2Use net to generate the first four points:
X0 = net(p,4)
X0 =
0.0928 0.6950 0.0029
0.6958 0.2958 0.8269
0.3013 0.6497 0.4141
0.9087 0.7883 0.2166Use parenthesis indexing to generate every third point, up to the 11th point:
X = p(1:3:11,:)
X =
0.0928 0.6950 0.0029
0.9087 0.7883 0.2166
0.3843 0.9840 0.9878
0.6831 0.7357 0.7923[1] Kocis, L., and W. J. Whiten. "Computational Investigations of Low-Discrepancy Sequences." ACM Transactions on Mathematical Software. Vol. 23, No. 2, 1997, pp. 266–294.
[2] Matousek, J. "On the L2-Discrepancy for Anchored Boxes." Journal of Complexity. Vol. 14, No. 4, 1998, pp. 527–556.
![]() | scatterhist | ScrambleMethod property (qrandset) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |