Membership Trapezoid function Plot

7 views (last 30 days)
Ameri
Ameri on 2 Jan 2023
Commented: Ameri on 14 Jan 2023
How would I plot the membership Trapezoid function for the Last Hop based on the follwoing table please

Accepted Answer

Ameri
Ameri on 12 Jan 2023
Thank you for your response, have you checked the table please.
  2 Comments
Sam Chak
Sam Chak on 13 Jan 2023
You are welcome, @Ameri. If the MATLAB code and explanation are helpful, would you accepting ✔ and voting 👍 my Answer? 😅

Sign in to comment.

More Answers (1)

Sam Chak
Sam Chak on 5 Jan 2023
The range for Last Hop is not given. So, you might try something like this:
fis = mamfis;
% Option #1: using rectified linear MFs
fis = addInput(fis, [-1 +1], 'Name', 'LH1');
fis = addMF(fis, 'LH1', 'linzmf', [-0.25 0.25], 'Name', 'Bad');
fis = addMF(fis, 'LH1', 'linsmf', [-0.25 0.25], 'Name', 'Good');
% Option #2: using trapezoidal MFs
fis = addInput(fis, [-1 +1], 'Name', 'LH2');
fis = addMF(fis, 'LH2', 'trapmf', [-2 -1 -0.25 0.25], 'Name', 'Bad');
fis = addMF(fis, 'LH2', 'trapmf', [-0.25 0.25 +1 +2], 'Name', 'Good');
% Plots
figure(1)
subplot(2,1,1)
plotmf(fis, 'input', 1), grid on, title('Last Hop using rectified linear MFs')
subplot(2,1,2)
plotmf(fis, 'input', 2), grid on, title('Last Hop using trapezoidal MFs')
  2 Comments

Sign in to comment.

Categories

Find more on Fuzzy Inference System Modeling in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!