.BusinessSimulation.Functions.gaussmf

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 Gaussian function given the real input x and the parameters half width at half maximum a and mean c.

Implementation


sigma = a / 1.177410022515474691;
y := exp(-(x - c) ^ 2 / (2 * sigma ^ 2));

Syntax

Functions.gaussmf(x, a, c);

Examples


Functions.gaussmf( 5, a=2, c=5); // 1.0 Functions.gaussmf( 3, a=2, c=5); // 0.5 Functions.gaussmf( 7, a=2, c=5); // 0.5

See also

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

Interface

function gaussmf
  extends BusinessSimulation.Icons.Function;
  input Real x "Input value for which the degree of membership is to be computed";
  input Real a "Half width at half maximum (HWHM)";
  input Real c "Mean value";
  output Real y "Degree of membership";
end gaussmf;

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos