reduceDimensions
Reduce dimensions of Sobol point set
Description
Examples
Reduce Dimensions of Sobol Point Set
Generate a seven-dimensional Sobol point set and scramble the points.
p = sobolset(7);
ps = scramble(p,'MatousekAffineOwen')
ps = Sobol point set in 7 dimensions (9007199254740992 points) Properties: Skip : 0 Leap : 0 ScrambleMethod : MatousekAffineOwen PointOrder : standard
Split the first 7168 points in ps
into seven levels of 1024 points each. Reduce the first 1024 points to be one-dimensional, the second 1024 points to be two-dimensional, and so on. For each level, compute the variance of the point values in each dimension.
variance = NaN(7); for level = 1:7 pr = reduceDimensions(ps,level); pr.Skip = (level-1)*1024; pts = pr(1:1024,:); variance(level,1:level) = var(pts); end
Plot the variances. The dark blue bars show the variance of the points in the first dimension, the dark orange bars show the variance of the points in the second dimension, and so on.
bar(variance) xlabel('Level') ylabel('Variances')
Input Arguments
p
— Sobol point set
sobolset
object
Sobol point set, specified as a sobolset
object.
d
— Number of dimensions to retain
positive integer scalar
Number of dimensions to retain from the point set p
, specified
as a positive integer scalar between 1 and the number of dimensions in
p
. The function always retains the first d
dimensions of p
.
Data Types: single
| double
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)