PLEASE HELP!! MATLAB APP DESIGNER UPLOAD FILE PROBLEM

3 次查看(过去 30 天)
Hello,
I have a question about read .fis in Matlab App Designer.
I want to import a .fis file into Matlab App Designer. And then I want to use these fuzzy in my designer. Basically, I want to get .fis file, select the number of panels and push button. After pushing button, numbers of selected in list box appears and I write the inputs. After writing age, experience and pulse (which are the inputs of my fuzzy system), I push the Button2 and I want to expect to see output of K value (which is the output of fuzzy system).
When I import data, and selected the inputs, I cannot get the output(1) (K value). Matlab cannot read evalfis. How can I do that? Also when I click the GET and upload the file, the screen goes backwards. If you can help me immediately, I will be pleased.
Thank You!
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
app.Panel1.Visible = "off";
app.Panel2.Visible = "off";
app.Panel3.Visible = "off";
end
% Callback function
function ButtonGroupSelectionChange(app, event)
end
% Button pushed function: Button
function ButtonPushed(app, event)
if app.ListBox.Value == "3"
app.Panel1.Visible = "on";
app.Panel2.Visible = "on";
app.Panel3.Visible = "on";
end
%app.Panel1.Visible="on";
end
% Value changed function: ListBox
function ListBoxValueChanged(app, event)
value = app.ListBox.Value;
end
% Button pushed function: GETButton
function GETButtonPushed(app, event)
[file,path] = uigetfile('*.fis');
selectedfile = fullfile(path,file);
%fuzzyLogicDesigner(selectedfile);
A = importdata(selectedfile);
end
% Value changed function: ageEditField
function ageEditFieldValueChanged(app, event)
value_age = app.ageEditField.Value;
end
% Value changed function: experienceEditField
function experienceEditFieldValueChanged(app, event)
value_experience = app.experienceEditField.Value;
end
% Value changed function: pulseEditField
function pulseEditFieldValueChanged(app, event)
value_pulse = app.pulseEditField.Value;
end
% Button pushed function: Button2
function Button2Pushed(app, event)
output = evalfis(A,[value_age value_experience value_pulse]);
app.KEditField.Value = output(1);
end
% Value changed function: KEditField
function KEditFieldValueChanged(app, event)
value = app.KEditField.Value;
end
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fuzzy Inference System Modeling 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by