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 returns a type-1 fuzzy membership function (MF) with default type, parameters, and name. To change the membership function properties, use dot notation.

example

mf = fismf(type,parameters) specifies the membership function type and parameters.

example

mf = fismf(___,Name=name) specifies the MF name for both of the previous syntaxes.

example

Input Arguments

expand all

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.

This argument sets the Type property.

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.

This argument sets the Parameters property.

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

This argument sets the Name property.

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.

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.

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