functionsmf

S-shaped membership function

Extends from BusinessSimulation.Icons.Function (Icon for functions).

Information

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.

Implementation


  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;

Syntax

Functions.smf(x, a, b);

Examples


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

See also

evalmf, rampmf, trimf, trapmf, sigmf, pimf, psigmf, gaussmf, gbellmf

Inputs

TypeNameDefaultDescription
RealxInput value for which the degree of membership is to be computed
RealaFoot of the function (i.e., f(a) = 0)
RealbShoulder of the function (i.e., f(b) = 1)

Outputs

TypeNameDefaultDescription
RealyDegree of membership