Plotting the output of an FIS appropriately.

Am implementing an FIS (Fuzzy Inference System). I want to plott the output in a UIAxes, I used this code:
function Diagnose(app)
handles.fisfile='Psychiatric Diagnosis FIS Model.fis';
%guidata(hObject,handles)
fisfile=handles.fisfile;
fis=readfis([fisfile]);% load the Fis file
%%%% read 5 inputs
input=([app.in1,app.in2,app.in3,app.in4,app.in5]);
[output,fuzzifiedIn,ruleOut,aggregatedOut,ruleFiring] =evalfis(fis,input);
%Plot 1st output{1}
app.op1 = output(1);
outputRange = linspace(fis.Output(1).range(1), fis.Output(1).range(2), length(aggregatedOut));
plot(app.UIAxes1,outputRange,aggregatedOut,[app.op1 app.op1],[0 1]);
app.DO1.Text = num2str(app.op1);
%Plot 2nd output
app.op2 = output(2);
outputRange = linspace(fis.Output(2).range(1), fis.Output(2).range(2), length(aggregatedOut));
plot(app.UIAxes2,outputRange,aggregatedOut,[app.op2 app.op2],[0 1]);
app.SIO2.Text = num2str(app.op2);
%Plot 3rd output
app.op3 = output(3);
outputRange = linspace(fis.Output(3).range(1), fis.Output(3).range(2), length(aggregatedOut));
plot(app.UIAxes3,outputRange,aggregatedOut,[app.op3 app.op3],[0 1]);
app.RTBO3.Text = num2str(app.op3);
return
end
I get the deffuzzified output but it is mixed up with unwanted and meaningless graph. As in the picture bellow, How can I get a clean Output as deffuzzification without the wrong (marked wrong) additions? Or, How can I plott FIS output appropriately? Thank you!

Risposte (0)

Categorie

Prodotti

Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by