Products & Services Solutions Academia Support User Community Company

Learn more about Fuzzy Logic Toolbox   

trapmf - Trapezoidal-shaped built-in 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

or, more compactly, by

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

Examples

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

See Also

dsigmf, gaussmf, gauss2mf, gbellmf, evalmf, mf2mf, pimf, psigmf, sigmf, smf, trimf, zmf

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS