Why the evalfis output is ignored (not displayed, no error message)

1 vue (au cours des 30 derniers jours)
Piotr Dlugiewicz
Piotr Dlugiewicz le 6 Mai 2021
Dear All,
For the code below the result of
output_fis3 = evalfis(aggTree,[50 100 34 2500 1800]);
is ignored on display, while in the Workspace 'output_fis3' exsists as a variable and gives correct value.
CODE ---
% Loading fis files as variables
fis1 = readfis('Roll_Alt')
fis2 = readfis('High_Pwr_Descend')
fis3 = readfis('Total_Risk')
% Connection
con1 = ["Roll_Alt/Ryzyko" "Total_Risk/Component_1"]
con2 = ["High_Pwr_Descend/Ryzyko" "Total_Risk/Component_2"]
% Tree
aggTree = fistree([fis1 fis2 fis3],[con1;con2]);
plotfis(aggTree)
% Tree Output
output_fis3 = evalfis(aggTree,[50 100 34 2500 1800]);
% Sample fis output
output_fis1 = evalfis(fis1,[50 100])
output_fis2 = evalfis(fis2, [34 2500 1800])

Réponses (2)

Walter Roberson
Walter Roberson le 6 Mai 2021
output_fis3 = evalfis(aggTree,[50 100 34 2500 1800]);
^
^
^
That semi-colon tells MATLAB to not display results to the command window. If you want see the result of the assignment, either ask to display the value specifically using fprintf() or disp(), or remove the semi-colon

Piotr Dlugiewicz
Piotr Dlugiewicz le 6 Mai 2021
Thank you. So easy!

Catégories

En savoir plus sur Fuzzy Inference System Modeling dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by