create.EM {EMMAgeo}  R Documentation 
This function allows creating artificial grainsize endmembers. One such "artificial endmember loading" may be composed of one or more superimposed normal distributions.
create.EM(p1, p2, s, boundaries, n)
p1 

p2 

s 

boundaries 

n 

When building a data set of many artificial end member loadings, these
should all have the same boundaries
and n
. The function
builds composites of individual normal distributions. Each distribution is
scaled according to s
. Finally the distribution is scaled to 100 %.
Numeric
vector with normalised endmember loadings,
consisting of the mixed normal distributions according to the input
parameters.
Michael Dietze, Elisabeth Dietze
## set lower and upper class boundary, number of classes and class units
boundaries < c(0, 11)
n < 40
phi < seq(from = boundaries[1],
to = boundaries[2],
length.out = n)
## create two artificial endmember loadings
EMa.1 < create.EM(p1 = c(2, 5), p2 = c(1, 0.8), s = c(0.7, 0.3),
boundaries = boundaries, n = n)
EMa.2 < create.EM(p1 = c(4, 7), p2 = c(1.1, 1.4), s = c(0.5, 0.5),
boundaries = boundaries, n = n)
## plot the two artificial endmember loadings
plot(phi, EMa.1, type = "l")
lines(phi, EMa.2, col = "red")