For a given domain, set of fuzzy function values, and defuzzification method, return the defuzzified (crisp) value of the fuzzy function.
The arguments x and y must be either two real numbers or two equal-length, non-empty vectors of reals, with the elements of x strictly increasing. defuzz_method must be a (case-sensitive) string corresponding to a defuzzification method. Defuzz handles both built-in and custom defuzzification methods.
The built-in defuzzification methods are:
Return the x-value of the centroid.
Return the x-value of the vertical bisector of the area.
Return the mean x-value of the points with maximum y-values.
Return the smallest (absolute) x-value of the points with maximum y-values.
Return the largest (absolute) x-value of the points with maximum y-values.
Return the weighted average of the x-values, with the y-values used as weights.
Return the weighted sum of the x-values, with the y-values used as weights.
Package: fuzzy-logic-toolkit