discreteSample edit page

take a diskrete sample from a list of vectors, orientations, grains, EBSD

Syntax

x = discreteSample(f,points)
[obj,ind] = discreteSample(obj,points)
v = discreteSample(v,points,'withReplacement')
ori = discreteSample(ori,points,'withReplacement')
ebsd = discreteSample(ebsd,points,'withoutReplacement')
gB = discreteSample(gB,points,'withoutReplacement')

Input

f density function, e.g., function handle, S2Fun, SO3Fun
gB grainBoundary
ebsd EBSD
ori orientation
v vector3d
points number of random samples

Output

obj same as first input
ind indeces of the selected subsamples

Options

withReplacement take the random sample with replacement (default)
withoutReplacement take the random sample without replacement