Latin hypercube sample


X = lhsdesign(n,p)
X = lhsdesign(...,'smooth','off')
X = lhsdesign(...,'criterion',criterion)
X = lhsdesign(...,'iterations',k)


X = lhsdesign(n,p) returns an n-by-p matrix, X, containing a latin hypercube sample of n values on each of p variables. For each column of X, the n values are randomly distributed with one from each interval (0,1/n), (1/n,2/n), ..., (1-1/n,1), and they are randomly permuted.

X = lhsdesign(...,'smooth','off') produces points at the midpoints of the above intervals: 0.5/n, 1.5/n, ..., 1-0.5/n. The default is 'on'.

X = lhsdesign(...,'criterion',criterion) iteratively generates latin hypercube samples to find the best one according to the criterion criterion, which can be one of the following strings.



No iteration.


Maximize minimum distance between points. This is the default.


Reduce correlation.

X = lhsdesign(...,'iterations',k) iterates up to k times in an attempt to improve the design according to the specified criterion. The default is k = 5.

Was this topic helpful?