Main Content

fismf

Fuzzy membership function

Description

Use a fismf object to represent a type-1 fuzzy membership function. For each input and output variable in a fuzzy inference system (FIS), one or more membership functions define the possible linguistic sets for that variable. For more information on membership functions, see Foundations of Fuzzy Logic.

Creation

Description

mf = fismf creates a fuzzy membership function (MF) with default type, parameters, and name. To change the membership function properties, use dot notation.

example

mf = fismf(type,parameters) sets the Type and Parameters properties.

example

mf = fismf('Name',name) sets the Name property.

example

mf = fismf(type,parameters,"Name",name) sets the Type, Parameters, and Name properties.

Properties

expand all

Membership function name, specified as a string or character vector.

Membership function type, specified as a string or character vector that contains the name of a function in the current working folder or on the MATLAB® path. You can also specify a handle to such a function. When you specify Type, you must also specify Parameters.

This table describes the values that you can specify for Type.

Membership Function TypeDescriptionFor More Information
"gbellmf"Generalized bell-shaped membership functiongbellmf
"gaussmf"Gaussian membership functiongaussmf
"gauss2mf"Gaussian combination membership functiongauss2mf
"trimf"Triangular membership functiontrimf
"trapmf"Trapezoidal membership functiontrapmf
"linsmf"Linear s-shaped saturation membership function (since R2022a)linsmf
"linzmf"Linear z-shaped saturation membership function (since R2022a)linzmf
"sigmf"Sigmoidal membership functionsigmf
"dsigmf"Difference between two sigmoidal membership functionsdsigmf
"psigmf"Product of two sigmoidal membership functionspsigmf
"zmf"Z-shaped membership functionzmf
"pimf"Pi-shaped membership functionpimf
"smf"S-shaped membership functionsmf
"constant"Constant membership function for Sugeno output membership functionsSugeno Fuzzy Inference Systems
"linear"Linear membership function for Sugeno output membership functions
String or character vectorName of a custom membership function in the current working folder or on the MATLAB path. Custom output membership functions are not supported for Sugeno systems.Build Fuzzy Systems Using Custom Functions
Function handleHandle to a custom membership function in the current working folder or on the MATLAB path. Custom output membership functions are not supported for Sugeno systems.

Note

When you change Type using dot notation, the values in Parameters are automatically converted for the new membership function type.

Membership function parameters, specified as a vector. The length of the parameter vector depends on the membership function type. When you specify Parameters, you must also specify Type.

Object Functions

evalmfEvaluate fuzzy membership function

Examples

collapse all

Create fuzzy membership function with default settings.

mf = fismf;

To modify the membership function settings, use dot notation. For example, specify a Gaussian membership function with a standard deviation of 2 and a mean of 10.

mf.Type = "gaussmf";
mf.Parameters = [2 10];

Create a trapezoidal membership function with specified parameters.

mf = fismf("trapmf",[10 15 20 25]);

Create a membership function with the name "large".

mf = fismf("Name","large");

Version History

Introduced in R2018b