.BusinessSimulation.Functions.sigmf

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 sigmoid function function given the real input x and the parameters shape parameter to control width of transition area a and center of transition area c.

The sigmoid function will increase from 0 to 1 for positive values of a, while negative values will give rise to a z-shaped transition.

Implementation


y := 1 / (1 + exp(-a * (x - c)));

Syntax

Functions.sigmf(x, a, c);

Examples


Functions.sigmf( 4, a=2, c=4); // 0.5 Functions.sigmf( 2, a=2, c=4); // 0.0179862.. Functions.sigmf( 6, a=2, c=4); // 0.98201379..

See also

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

Interface

function sigmf
  extends BusinessSimulation.Icons.Function;
  input Real x "Input value for which the degree of membership is to be computed";
  input Real a "Shape parameter controlling the width of s-shaped transition area (higher values → steeper transition)";
  input Real c "Center of the s-shaped transition area";
  output Real y "Degree of membership";
end sigmf;

Generated at 2024-11-20T19:25:51Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos