fismf

Fuzzy membership function

Description

Use fismf objects to represent fuzzy membership functions. 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

Syntax

mf = fismf
mf = fismf(type,parameters)
mf = fismf('Name',name)
mf = fismf(type,parameters,'Name',name)

Description

example

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.

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
"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 functionsWhat Is Sugeno-Type Fuzzy Inference?
"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");

Introduced in R2018b