To obtain the fuzzy set values, the evalmf() function can be used. In this example, the fuzzy sets are constructed using the Gaussian Membership functions:
x = 0:0.1:25;
mf1 = fismf("gaussmf", [2, 0]);
mf2 = fismf("gaussmf", [2, 5]);
mf3 = fismf("gaussmf", [2, 10]);
mf4 = fismf("gaussmf", [2, 15]);
mf5 = fismf("gaussmf", [2, 20]);
y1 = evalmf(mf1, x);
y2 = evalmf(mf2, x);
y3 = evalmf(mf3, x);
y4 = evalmf(mf4, x);
y5 = evalmf(mf5, x);
plot(x, [y1; y2; y3; y4; y5]'), grid on, ylim([-0.2 1.2]), xlabel('\it{x}'), ylabel('\mu(\it{x})')
If we want to find the MF values over specific input values in x, then the following syntax is used:
X = [2 5.5 23 14 6.5 7 9 20];
Y1 = evalmf(mf1, X)
Y2 = evalmf(mf2, X)
Y3 = evalmf(mf3, X)
Y4 = evalmf(mf4, X)
Y5 = evalmf(mf5, X)