How to automatically accommodate the MF in the assigned range and not all stay in the same position in Fuzzylogicdesigner
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I want to use the new fuzzy interface, but a function to add several mf at the same time is not possible and in turn does not fit me along my assigned range as in the previous version
0 Commenti
Risposte (1)
Sam Chak
il 3 Feb 2023
If there are not too many MFs, can consider writing a brief script to flexibly design the MFs as you wish.
You can also check for various types of MFs here:
fis = mamfis;
% Input 1
fis = addInput(fis, [-1 +1], 'Name', 'in1');
fis = addMF(fis, 'in1', 'trimf', [-2 -1 0], 'Name', 'N');
fis = addMF(fis, 'in1', 'trimf', [-1 0 1], 'Name', 'Z');
fis = addMF(fis, 'in1', 'trimf', [ 0 1 2], 'Name', 'P');
% Input 2
fis = addInput(fis, [-1 +1], 'Name', 'in2');
fis = addMF(fis, 'in2', 'trimf', [-1 -1.00 -0.25], 'Name', 'NB');
fis = addMF(fis, 'in2', 'trimf', [-1.00 -0.25 0], 'Name', 'NS');
fis = addMF(fis, 'in2', 'trimf', [-0.25 0 0.25], 'Name', 'Z' );
fis = addMF(fis, 'in2', 'trimf', [ 0 0.25 1.00], 'Name', 'PS');
fis = addMF(fis, 'in2', 'trimf', [ 0.25 1.00 1], 'Name', 'PB');
% Plots
subplot(2,1,1)
plotmf(fis, 'input', 1), grid on, title('Input 1')
subplot(2,1,2)
plotmf(fis, 'input', 2), grid on, title('Input 2')
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!