MATLAB: How to apply Fuzzy Inference System in MATLAB App Designer

fuzzy inference systemmatlab app designer

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?

Best Answer

Hi, you can use uigetfile to achieve the same.
  1. Drag and drop the button onto the designer workspace
  2. Right click the button, hover over 'callbacks', select 'AddButtonPushedFcn callback'
  3. Paste the following code inside the ButtonPushed function
[file,path] = uigetfile('*.fis');
selectedfile = fullfile(path,file);
fuzzyLogicDesigner(selectedfile);
4. Save & Run the App.
Related Question