필터 지우기
필터 지우기

error in evalfis function

조회 수: 1 (최근 30일)
la
la 2015년 8월 29일
댓글: la 2015년 8월 29일
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

채택된 답변

Walter Roberson
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.
  댓글 수: 1
la
la 2015년 8월 29일
Wow.It is a subtle point! Thanks a lot Mr. Walter Roberson

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by