How to get the fuzzy value of an input when the crisp value is given
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have implemented a fuzzy logic system using toolbox. I want to get the fuzzy value of the crisp input using matlab code. Can you please help me to do this.
0 Commenti
Risposte (1)
Sam Chak
il 18 Set 2022
The evalmf() function can used in this situation.
help evalmf
x = -10:0.1:10;
mf = fismf("pimf", [-9 -7 2 7]);
y = evalmf(mf, x);
% plot membership function
plot(x, y, 'linewidth', 1.5), grid on, ylim([-0.2 1.2]);
xlabel('\it{x}'), ylabel('\mu(\it{x})')
% find the fuzzy value when the crisp value x = 4
fuz_value = evalmf(mf, 4)
xline(4, '--', '4');
yline(fuz_value, '--', sprintf('%.4f', fuz_value));
0 Commenti
Vedere anche
Categorie
Scopri di più su Fuzzy Logic Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!