error in evalfis function
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear MathWorks Team
Hello
Please guide me about the following problem:
By MATLAB fuzzy toolbox, I created a fuzzy system. [ Fis file(compressed with WinRAR) and evalfis function code are attached]:
1. input1 range is -0.5 to 0.5 .
2. Input2 Range is 0 to 1 .
3. The output range is -0.5 to 0.5 .
To extract the points of this fuzzy system, I use evalfis function in my code, according to following commands:
a = readfis('my controller.fis');
fid = fopen('my controller.txt', 'w');
for e = -0.5:0.01:0.5
for y = 0:0.01:1
Out1 = evalfis([e y], a);
fprintf(fid,'%f,%f:%f\n',e,y,Out1);
end
end
fclose(fid);
The first time this code is worked correctly. But the next time, following error occurs !!
" In evalfis at 76
Warning: Some input values are outside of the specified input range."
How do I fix this? ّ Please reply as soon as possible.I need this code for my Project!
Best Thanks and Regards
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 29 Aug. 2015
For Input1, you set the function for the state 'Negative' to be [-0.5 -0.5 0] . When you are using triangular membership, if your second value is equal to the first value or the third value, you get division by 0, which is Not Going To End Well.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!