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 S-shaped function given the real input x and the parameters foot a
and shoulder b
of the function.
y := if x <= a then 0 elseif a < x and x <= midpoint then 2 * ( (x-a)/(b-a) )^2 elseif midpoint < x and x <= b then 1 - 2 * ( (x-b)/(b-a) )^2 else 1;
Functions.smf(x, a, b);
Functions.smf( 5, a=2, b=8); // 0.5 Functions.smf( 1, a=2, b=8); // 0.0 Functions.smf( 9, a=2, b=8); // 1.0
evalmf, rampmf, trimf, trapmf, sigmf, pimf, psigmf, gaussmf, gbellmf
function smf extends BusinessSimulation.Icons.Function; input Real x "Input value for which the degree of membership is to be computed"; input Real a "Foot of the function (i.e., f(a) = 0)"; input Real b "Shoulder of the function (i.e., f(b) = 1)"; output Real y "Degree of membership"; end smf;