フィルターのクリア

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 Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by