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:

If type is not one of the above, it is assumed to be a user-defined function. x and mf are passed to this function to generate the defuzzified output.

Examples

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


© 1994-2005 The MathWorks, Inc.