error in evalfis function
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
la
el 29 de Ag. de 2015
Comentada: la
el 29 de Ag. de 2015
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 comentarios
Respuesta aceptada
Walter Roberson
el 29 de Ag. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Fuzzy Logic Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!