How can I apply Fuzzy Inference System in MATLAB App Designer
Afficher commentaires plus anciens
Good day to all.
I have designed a system using Fuzzy Logic Toolbox and now I want to implement the Fuzzy Inference System in the standalone application which I am going to develop using MATLAB App Designer.
The basic function of the application is to calculate the risk level of the disease using fuzzy logic. The user will be required to insert the inputs in numerical forms and the ouput will be the risk level. So there will be a button to allow the user to press in order to generate the output.
My question is how to link the .fis file in the button of the App Designer?
Réponse acceptée
Plus de réponses (3)
Li Mun Ng
le 6 Août 2019
0 votes
4 commentaires
Subhadeep Koley
le 6 Août 2019
Hi, I understand the issue.
Go to "Fuzzy Button > callbacks > AddButtonPushedFcn callback" and paste the following code
fis = readfis('yourFIS');
i1=app.IP1EditField.Value; % replace "IP1.EditField" with your field name
i2=app.IP2EditField.Value; % do the same for all the input & output fields
i3=app.IP3EditField.Value;
i4=app.IP4EditField.Value;
inputs=[i1 i2 i3 i4];
output = evalfis(fis,inputs);
app.OPEditField.Value=output;
This might be helpful.
Li Mun Ng
le 6 Août 2019
Subhadeep Koley
le 6 Août 2019
When I am executing the same code for the MATLAB in-built "tipper.fis" fis file it is giving me correct Output everytime.
function FuzzyButtonPushed(app, event)
fis = readfis('tipper');
i1=app.IP1EditField.Value;
i2=app.IP2EditField.Value;
inputs=[i1 i2];
output = evalfis(inputs,fis);
app.OPEditField.Value=output;
end
Therefore it is difficult to say which part went wrong without knowing what inputs your fis expect.

Li Mun Ng
le 7 Août 2019
Walter Roberson
le 6 Août 2019
0 votes
chiwapon nitnara
le 2 Mar 2020
0 votes
from this code i'm try to use this code to 2 output how to??? Thank you
1 commentaire
Imam Pratama Setiady
le 3 Fév 2021
have you succeeded using 2 outputs? can you help me
Catégories
En savoir plus sur Fuzzy Logic in Simulink dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!.png)
.png)
