Accelerating the pace of engineering and science

# gauss2mf

Gaussian combination membership function

## Syntax

```y = gauss2mf(x,[sig1 c1 sig2 c2])
```

## Description

The Gaussian function depends on two parameters sig and c as given by

$f\left(x;\sigma ,c\right)={e}^{\frac{-{\left(x-c\right)}^{2}}{2{\sigma }^{2}}}$

The function gauss2mf is a combination of two of these two parameters. The first function, specified by sig1 and c1, determines the shape of the left-most curve. The second function specified by sig2 and c2 determines the shape of the right-most curve. Whenever c1 < c2, the gauss2mf function reaches a maximum value of 1. Otherwise, the maximum value is less than one. The parameters are listed in the order:

 [sig1, c1, sig2, c2] .

## Examples

expand all

### Gaussian Combination Membership Functions

```x = [0:0.1:10]';
y1 = gauss2mf(x,[2 4 1 8]);
y2 = gauss2mf(x,[2 5 1 7]);
y3 = gauss2mf(x,[2 6 1 6]);
y4 = gauss2mf(x,[2 7 1 5]);
y5 = gauss2mf(x,[2 8 1 4]);
plot(x,[y1 y2 y3 y4 y5]);
```