Input variable "trimf" does not exist.

here is the code snippet
addMF(input_temperature, 'trimf', [0 0 50], 'cold');
addMF(input_temperature, 'trimf', [0 50 100], 'medium');
addMF(input_temperature, 'trimf', [50 100 100], 'hot');
addMF(input_humidity, 'trimf', [0 0 50], 'low');
addMF(input_humidity, 'trimf', [0 50 100], 'medium');
addMF(input_humidity, 'trimf', [50 100 100], 'high');

 Akzeptierte Antwort

Sam Chak
Sam Chak am 13 Okt. 2023

0 Stimmen

Some syntax issues. They are fixed as shown below:
fis = mamfis;
fis = addInput(fis, [0 100], "Name", "input_temperature");
fis = addInput(fis, [0 100], "Name", "input_humidity");
fis = addMF(fis, "input_temperature", 'trimf', [0 0 50], "Name", 'cold');
fis = addMF(fis, "input_temperature", 'trimf', [0 50 100], "Name", 'medium');
fis = addMF(fis, "input_temperature", 'trimf', [50 100 100], "Name", 'hot');
fis = addMF(fis, "input_humidity", 'trimf', [0 0 50], "Name", 'low');
fis = addMF(fis, "input_humidity", 'trimf', [0 50 100], "Name", 'medium');
fis = addMF(fis, "input_humidity", 'trimf', [50 100 100], "Name", 'high');
subplot(211)
plotmf(fis, "input", 1)
subplot(212)
plotmf(fis, "input", 2)

Weitere Antworten (0)

Kategorien

Mehr zu Fuzzy Inference System Modeling finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2023b

Gefragt:

am 13 Okt. 2023

Kommentiert:

am 13 Okt. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by