Octave Fuzzy Logic Toolkit: sigmf

### Function Reference: `sigmf`

Function File: y = sigmf (x, params)
Function File: y = sigmf ([x1 x2 ... xn], [a c])

For a given domain x and parameters params (or [a c]), return the corresponding y values for the sigmoidal membership function.

The argument x must be a real number or a non-empty vector of strictly increasing real numbers, and a and c must be real numbers. This membership function satisfies the equation:

         f(x) = 1/(1 + exp(-a*(x - c)))

which always returns values in the range [0, 1].

The parameters a and c specify:

         a == the slope at c
         c == the inflection point

and at the inflection point, the value of the function is 0.5:

         f(c) == 0.5.

To run the demonstration code, type "`demo sigmf`" (without the quotation marks) at the Octave prompt.

See also: dsigmf, gauss2mf, gaussmf, gbellmf, pimf, psigmf, smf, trapmf, trimf, zmf

### Example: 1

     x = 0:100;
     params = [0.3 40];
     y1 = sigmf(x, params);
     params = [0.2 40];
     y2 = sigmf(x, params);
     params = [0.1 40];
     y3 = sigmf(x, params);
     figure('NumberTitle', 'off', 'Name', 'sigmf demo');
     plot(x, y1, 'r;params = [0.3 40];', 'LineWidth', 2)
     hold on;
     plot(x, y2, 'b;params = [0.2 40];', 'LineWidth', 2)
     hold on;
     plot(x, y3, 'g;params = [0.1 40];', 'LineWidth', 2)
     ylim([-0.1 1.2]);
     xlabel('Crisp Input Value', 'FontWeight', 'bold');
     ylabel('Degree of Membership', 'FontWeight', 'bold');
     grid;