How to get the fuzzy value of an input when the crisp value is given
12 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Sam Chak
2022 年 9 月 18 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fuzzy Logic Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!