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.
Functions.evalmf(x, mft, a, b, c, d);
Functions.evalmf( 5, mft = MembershipFunctionTypes.trapezoid, a=2, b=4, c=6, d=8); // 1.0
rampmf, trapmf, trimf, smf, sigmf, pimf, psigmf, gaussmf, gbellmf
function evalmf
import BusinessSimulation.Types.MembershipFunctionTypes;
import BusinessSimulation.Functions.{rampmf,trimf,smf,sigmf,pimf,psigmf,gaussmf,gbellmf,trapmf};
extends BusinessSimulation.Icons.Function;
input Real x "Input value for which the degree of membership is to be computed";
input MembershipFunctionTypes mft = MembershipFunctionTypes.trapezoidal "Type of membership function to be used";
input Real a "Parameter of membership function";
input Real b "Parameter of membership function";
input Real c "Parameter of membership function";
input Real d "Parameter of membership function";
output Real y "Degree of membership";
end evalmf;