Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

trapmf

Trapezoidal-shaped membership function

Syntax

y = trapmf(x,[a b c d]) 

Description

The trapezoidal curve is a function of a vector, x, and depends on four scalar parameters a, b, c, and d, as given by

f(x;a,b,c,d)={0,xaxaba,axb1,bxcdxdc,cxd0,dx}

or, more compactly, by

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

The parameters a and d locate the "feet" of the trapezoid and the parameters b and c locate the "shoulders."

Examples

collapse all

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

Introduced before R2006a

Was this topic helpful?