How to change the Type of MF from trimf to constant in the Fuzzy Logic Designer app?

조회 수: 1 (최근 30일)
m gh
m gh 2021년 7월 21일
답변: Sam Chak 2024년 9월 30일
how to change the Type of the current variable from trimf to constant in "fuzzy logic designer"? Unfortunately, I can't find constant value, although you can add constant value by coding.

답변 (1개)

Sam Chak
Sam Chak 2024년 9월 30일
You can convert the Triangular MFs to Singletons (constant MFs) using this workaround, by specifying all three triMF parameters to have the same values in the Fuzzy Logic Designer app.
fis = mamfis('NumInputs', 1);
%% Triangular MFs (triMFs)
figure
plotmf(fis, 'input', 1), grid on,
title('Before conversion: Triangular MFs')
%% Convert triMFs to Singletons
fis.Inputs(1).MembershipFunctions(1).Parameters = [0.0 0.0 0.0];
fis.Inputs(1).MembershipFunctions(2).Parameters = [0.5 0.5 0.5];
fis.Inputs(1).MembershipFunctions(3).Parameters = [1.0 1.0 1.0];
figure
plotmf(fis, 'input', 1, 2001), grid on, xlim([-0.2, 1.2])
title('After conversion: Constant MFs')

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by