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:
which always returns values in the range [0, 1].
The parameters a and c specify:
and at the inflection point, the value of the function is 0.5:
To run the demonstration code, type demo('sigmf') at the Octave prompt.
See also: dsigmf, gauss2mf, gaussmf, gbellmf, pimf, psigmf, smf, trapmf, trimf, zmf.
The following code
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;
Produces the following figure
Figure 1 |
---|
Package: fuzzy-logic-toolkit