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

 Respuesta aceptada

Sam Chak
Sam Chak el 13 de Oct. de 2023
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)

Más respuestas (0)

Categorías

Más información sobre Fuzzy Inference System Modeling en Centro de ayuda y File Exchange.

Productos

Versión

R2023b

Preguntada:

el 13 de Oct. de 2023

Comentada:

el 13 de Oct. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by