Main Content

Trapezoidal MF

Trapezoidal membership function

  • Trapezoidal MF block

Libraries:
Fuzzy Logic Toolbox / Membership Functions

Description

The Trapezoidal MF block implements a trapezoid-shaped membership function.

f(x;a,b,c,d)=max(min(xaba,1,dxdc),0)

The parameters a and d control the left and right feet or base points of the trapezoid. The parameters b and c control the left and right shoulders or top points of the trapezoid.

The shape of the membership function depends on the relative values of b and c.

  • When c is greater than b, the resulting membership function is trapezoidal.

  • When b is equal to c, the resulting membership function is equivalent to a triangular membership function with parameters [a b d].

  • When c is less than b, the resulting membership function is triangular with a maximum value less than 1.

This block is related to the Triangular MF, Linear S-shaped MF, and Linear Z-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 MF match the dimensions of x. Each element of MF is the membership value computed for the corresponding element of x.

Parameters

expand all

Left foot a of the trapezoid.

Programmatic Use

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

Left shoulder b of the trapezoid.

Programmatic Use

Block Parameter: b
Type: string, character vector
Default: "-4"

Right shoulder c of the trapezoid.

Programmatic Use

Block Parameter: c
Type: string, character vector
Default: "2"

Right foot d of the trapezoid.

Programmatic Use

Block Parameter: d
Type: string, character vector
Default: "9"

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