discreteSample

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

Syntax

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

Input

gB

grainBoundary

ebsd

EBSD

ori

orientation

v

vector3d

points

number of random samples

param,val Parameters and values that control discreteSample
Parameter Description
'withReplacement'

take the random sample with replacement (default)

'withoutReplacement'

take the random sample without replacement

Output

obj

same as first input

ind

indeces of the selected subsamples