# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# smf

S-shaped membership function

## Syntax

y = smf(x,[a b])

## Description

This spline-based curve is a mapping on the vector x, and is named because of its S-shape. The parameters a and b locate the extremes of the sloped portion of the curve, as given by:

$f\left(x;a,b\right)=\left\{\begin{array}{cc}0,& x\le a\\ 2{\left(\frac{x-a}{b-a}\right)}^{2},& a\le x\le \frac{a+b}{2}\\ \text{1}-\text{2}{\left(\frac{x-b}{b-a}\right)}^{\text{2}},& \frac{a+b}{2}\le x\le b\\ 1,& x\ge b\end{array}\right\}$

## Examples

collapse all

x = 0:0.1:10;
y = smf(x,[1 8]);
plot(x,y)
xlabel('smf, P = [1 8]')
ylim([-0.05 1.05])