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

1 回表示 (過去 30 日間)
Piotr Dlugiewicz
Piotr Dlugiewicz 2021 年 5 月 6 日
回答済み: Piotr Dlugiewicz 2021 年 5 月 6 日
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])

回答 (2 件)

Walter Roberson
Walter Roberson 2021 年 5 月 6 日
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 2021 年 5 月 6 日
Thank you. So easy!

カテゴリ

Help Center および File ExchangeFuzzy Inference System Modeling についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by