# fismf

Fuzzy membership function

Since R2018b

## 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

### 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`.

`"gbellmf"`Generalized 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`
`"linsmf"`Linear s-shaped saturation membership function`linsmf`
`"linzmf"`Linear z-shaped saturation membership function`linzmf`
`"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 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

 `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 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