This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

defuzz

Defuzzify membership function

Syntax

out = defuzz(x,mf,type) 

Description

defuzz(x,mf,type) returns a defuzzified value out, of a membership function mf positioned at associated variable value x, using one of several defuzzification strategies, according to the argument, type. The variable type can be one of the following:

  • 'centroid' — Centroid of the area under the output fuzzy set. This method is the default for Mamdani systems.

  • 'bisector' — Bisector of the area under the output fuzzy set

  • 'mom' — Mean of the values for which the output fuzzy set is maximum

  • 'lom' — Largest value for which the output fuzzy set is maximum

  • 'som' — Smallest value for which the output fuzzy set is maximum

You can also specify type using a character vector or string that contains the name of a custom function in the current working folder or on the MATLAB® path. For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.

Examples

collapse all

x = -10:0.1:10;
mf = trapmf(x,[-10 -8 -4 7]);
out = defuzz(x,mf,'centroid')
out = -3.2857

Introduced before R2006a