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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Inference System Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!