This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The function returns the degree of membership using a Gaussian function given the real input x and the parameters half width at half maximum a
and mean c
.
sigma = a / 1.177410022515474691; y := exp(-(x - c) ^ 2 / (2 * sigma ^ 2));
Functions.gaussmf(x, a, c);
Functions.gaussmf( 5, a=2, c=5); // 1.0 Functions.gaussmf( 3, a=2, c=5); // 0.5 Functions.gaussmf( 7, a=2, c=5); // 0.5
evalmf, rampmf, trimf, trapmf, smf, sigmf, pimf, psigmf, gbellmf
function gaussmf extends BusinessSimulation.Icons.Function; input Real x "Input value for which the degree of membership is to be computed"; input Real a "Half width at half maximum (HWHM)"; input Real c "Mean value"; output Real y "Degree of membership"; end gaussmf;