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');

 采纳的回答

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)

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Fuzzy Inference System Modeling 的更多信息

产品

版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by