evalmf

Evaluate a fuzzy membership function

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 the membership function specified.

Syntax

Functions.evalmf(x, mft, a, b, c, d);

Examples


Functions.evalmf( 5, mft = MembershipFunctionTypes.trapezoid, a=2, b=4, c=6, d=8); // 1.0

See also

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

Syntax

y = evalmf(x, mft, a, b, c, d)

Inputs (6)

x

Type: Real

Description: Input value for which the degree of membership is to be computed

mft

Default Value: MembershipFunctionTypes.trapezoidal

Type: MembershipFunctionTypes

Description: Type of membership function to be used

a

Type: Real

Description: Parameter of membership function

b

Type: Real

Description: Parameter of membership function

c

Type: Real

Description: Parameter of membership function

d

Type: Real

Description: Parameter of membership function

Outputs (1)

y

Type: Real

Description: Degree of membership