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