How to automatically accommodate the MF in the assigned range and not all stay in the same position in Fuzzylogicdesigner

1 次查看(过去 30 天)
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

回答(1 个)

Sam Chak
Sam Chak 2023-2-3
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')

类别

Help CenterFile Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by