error in evalfis function
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2015년 8월 29일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!