How to put model from Fuzzy Logic Designer to App Designer ?

5 ビュー (過去 30 日間)
Katarzyna Piotrowska
Katarzyna Piotrowska 2023 年 6 月 13 日
回答済み: Praveen Reddy 2023 年 6 月 26 日
I need to create an app where user can put his lingustic variables to 5/6 categories. After that user should be able to click some button and receive an answer from the system.
The answer should be calculated based on provided variables in model/file created in Fuzzy Logic Designer.

回答 (1 件)

Praveen Reddy
Praveen Reddy 2023 年 6 月 26 日
Hi Katarzyna,
I understand that you have designed a system in Fuzzy Logic Designer App and implement the Fuzzy Inference System in App Designer with a button click event. You can use ‘uigetfile’ and ‘evalfis’ functions for the same.
  • Add a button to the App Designer Workspace
  • Add a button pushed function call back to the added button.
  • You can add the ‘uigetfile’ in the call back, collect the inputs from UI and pass the same to the fuzzy inference system fis using ‘evalfis’ as suggested below
[file,path] = uigetfile('*.fis'); %your .fis file
input1=app.Input1EditField.Value; % replace "IP1.EditField" with your field name
input2=app.Input2EditField.Value;
inputs=[input1,input2];
output=evalfis(fis,inputs);
app.OutputEditField.value=output;
Please refer to the following MATLAB documentations to know more about how to add call back function in App Designer, ‘evalfis’ function

カテゴリ

Help Center および File ExchangeFuzzy Inference System Modeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by