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
댓글 수: 0
답변 (1개)
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')
댓글 수: 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!