why i do Unrecognize variable addInput?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I had a problem in running mscript fuzzy in matlab 2022 (Unrecognize variable addInput). How can i fix that?
There is a script
fis1 = 'sugfis';
% Define input variables and ranges
fis1 = addInput(fis1,[-1 1],'Name','E');
fis1 = addInput(fis1, [-1 1],'Name','delE');
% Define mf’s of input variable
fis1 = addMF(fis1,'E','trimf',[-1 -1 0],'Name','N');
fis1 = addMF(fis1,'E','trimf',[-1 0 1],'Name','Z');
fis1 = addMF(fis1,'E','trimf',[0 1 1],'Name','P');
fis1 = addMF(fis1,'delE','trimf',[-1 -1 0],'Name','N');
fis1 = addMF(fis1,'delE','trimf',[-1 0 1],'Name','Z');
fis1 = addMF(fis1,'delE','trimf',[0 1 1],'Name','P');
% Define output variables and ranges
fis1 = addOutput(fis1,[-1 1],'Name','U');
% Define mf’s of output variable
fis1 = addMF(fis1,'U','constant',[-1],'Name','NL');
fis1 = addMF(fis1,'U','constant',[-0.8],'Name','NS');
fis1 = addMF(fis1,'U','constant',[0],'Name','Z');
fis1 = addMF(fis1,'U','constant',[0.8],'Name','PS');
fis1 = addMF(fis1,'U','constant',[1],'Name','PB');
rules = [...
"E==N & delE==N => U=NL"; ...
"E==Z & delE==N => U=NS"; ...
"E==P & delE==N => U=Z"; ...
"E==N & delE==Z => U=NS"; ...
"E==Z & delE==Z => U=Z"; ...
"E==P & delE==Z => U=PS"; ...
"E==N & delE==P => U=Z"; ...
"E==Z & delE==P => U=PS"; ...
"E==P & delE==P => U=PB"; ...
];
% Add rule table
fis1 = addRule(fis1,rules);
There is a problem
Error in TIPE1 (line 3)
fis1 = addInput(fis1,[-1 1],'Name','E');
Thanks Before
Regards,
Carolus
0 commentaires
Voir également
Catégories
En savoir plus sur Fuzzy Logic Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!