Trapezoidal membership function
This function computes fuzzy membership values using a trapezoidal membership
function. You can also compute this membership function using a
object. For more information, see fismf Object.
This membership function is related to the
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])
x— Input values
Input values for which to compute membership values, specified as a scalar or vector.
params— Membership function parameters
Membership function parameters, specified as the vector [a b c d]. Parameters b and c define the shoulders of the membership function, and a and d define its feet.
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 to b, the resulting membership function is triangular with a maximum value less than 1.
You can create and evaluate a
fismf object that
trapmf membership function.
mf = fismf("trapmf",P); Y = evalmf(mf,X);
Y correspond to