Main Content

fismf

Fuzzy membership function

Description

Use afismfobject 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, seeFoundations of Fuzzy Logic.

Creation

Description

example

mf= fismfcreates 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 theTypeandParametersproperties.

example

mf= fismf('Name',name)sets theNameproperty.

mf= fismf(type,parameters,'Name',name)sets theType,Parameters, andNameproperties.

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 specifyType, you must also specifyParameters.

This table describes the values that you can specify forType.

隶属函数类型 Description For More Information
"gbellmf" 一般ized bell-shaped membership function gbellmf
"gaussmf" Gaussian membership function gaussmf
"gauss2mf" Gaussian combination membership function gauss2mf
"trimf" Triangular membership function trimf
"trapmf" Trapezoidal membership function trapmf
"sigmf" Sigmoidal membership function sigmf
"dsigmf" Difference between two sigmoidal membership functions dsigmf
"psigmf" Product of two sigmoidal membership functions psigmf
"zmf" Z-shaped membership function zmf
"pimf" Pi-shaped membership function pimf
"smf" S-shaped membership function smf
"constant" Constant membership function for Sugeno output membership functions Sugeno Fuzzy Inference Systems
"linear" 线性隶属函数为Sugeno membe输出rship functions
String or character vector Name 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 handle Handle 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 changeTypeusing dot notation, the values inParametersare 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 specifyParameters, you must also specifyType.

Object Functions

evalmf Evaluate 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 of2and a mean of10.

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