The value of membership functions for x
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hi
how to define the output fuzzy set as fuzzy values - which mean's that the outputs membership functions multi-valued as in picture below .
So in Matlab for example I want to ses the MF value for the input X.
Which code or function should use to have the values of MF as outputs if x is a vector e.g. x= [2 5.5 23 14 6.5 7 9 20]?
Thanks in advance
0 comentarios
Respuestas (1)
Sam Chak
el 16 de Sept. de 2022
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)
0 comentarios
Ver también
Categorías
Más información sobre Fuzzy Logic Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!