
How to plot 3 membership function and find the µ of each one for a specific X ?
4 ビュー (過去 30 日間)
古いコメントを表示
Hello ,
i want to plot 3 trapezoidal membership functions : the first one is : [ 0 0.3 0.4] second [0.3 0.4 0.6 0.7] third [0.6 0.7 1 ] like this

and i have a table of points that i want to plot here and get the membership function of each one i found how to do it with one function but not with 3 .
thank you for the help .
0 件のコメント
採用された回答
Sam Chak
2022 年 6 月 2 日
編集済み: Sam Chak
2022 年 6 月 2 日
Edit: To include the firing of fuzzy membership value μ corresponding to the x value,
x = 0:0.01:1;
y1 = trapmf(x, [-0.1 0.0 0.3 0.4]);
y2 = trapmf(x, [0.3 0.4 0.6 0.7]);
y3 = trapmf(x, [0.6 0.7 1.0 1.1]);
plot(x, y1, x, y2, x, y3, 'linewidth', 1.5)
hold on
xMark = 0.67;
y1Mark = trapmf(xMark, [-0.1 0.0 0.3 0.4]);
y2Mark = trapmf(xMark, [0.3 0.4 0.6 0.7]);
y3Mark = trapmf(xMark, [0.6 0.7 1.0 1.1]);
plot(xMark*x, y2Mark*ones(size(x)), '--', 'linewidth', 1.25)
plot(xMark*x, y3Mark*ones(size(x)), '--', 'linewidth', 1.25)
plot(xMark*ones(size(x)), y3Mark*x, '--', 'linewidth', 1.25)
hold off
grid on
ylim([-0.2 1.4])
xlabel('x')
ylabel('Degree of Membership, \mu')
legend('faible', 'moyenne', 'forte', 'location', 'best')

4 件のコメント
Sam Chak
2022 年 6 月 2 日
Thanks for your acceptance. I have edited the original Answer to include the firing of fuzzy membership value μ corresponding to the x value. I think you will like this, because you have more control over the plot.
その他の回答 (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!
