rampmfBounded ramp 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 bounded ramp function given the real input x and the parameters lower bound a
and upper bound b
.
The ramp will usually ramp up from 0 to 1, but if lower bound and upper bound are switched (i.e., a > b
), then the ramp will be ramp downwards from 1 to 0.
y := max(min((x - a) / (b - a), 1), 0);
Functions.rampmf(x, a, b);
Functions.rampmf( 5, a=2, b=8); // 0.5 Functions.rampmf( 1, a=2, b=8); // 0.0 Functions.rampmf( 9, a=2, b=8); // 1.0
evalmf, trimf, trapmf, smf, 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: Lower bound |
b |
Type: Real Description: Upper bound |
y |
Type: Real Description: Degree of membership |
---|