smfS-shaped membership function |
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
x |
Type: Real Description: Input value for which the degree of membership is to be computed |
---|---|
a |
Type: Real Description: Foot of the function (i.e., f(a) = 0) |
b |
Type: Real Description: Shoulder of the function (i.e., f(b) = 1) |
y |
Type: Real Description: Degree of membership |
---|