Main Content

S-shaped MF

S-shaped membership function

  • S-shaped MF block

Libraries:
Fuzzy Logic Toolbox / Membership Functions

Description

The S-shaped MF block implements an s-shaped membership function.

f(x;a,b)={0,xa2(xaba)2,axa+b21-2(xbb-a)2,a+b2xb1,xb}

Going from left to right the function increases from 0 to 1. The parameters a and b control the left and right extremes of the sloped portion of the curve.

This block is related to the Z-shaped MF and Pi-shaped MF blocks.

Ports

Input

expand all

Input value for which to compute membership values, specified as a scalar or vector.

Output

expand all

Membership value, returned as a scalar or a vector. The dimensions of S MF match the dimensions of x. Each element of S MF is the membership value computed for the corresponding element of x.

Parameters

expand all

Leftmost point a of the transition area.

Programmatic Use

Block Parameter: a
Type: string, character vector
Default: "-3"

Rightmost point b of the transition area.

Programmatic Use

Block Parameter: b
Type: string, character vector
Default: "3"

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Version History

Introduced before R2006a