How to send the output of a fuzzy system to a function
1 回表示 (過去 30 日間)
古いコメントを表示
hi
how can i send output of fuzzy to a function ???
thanks
0 件のコメント
回答 (1 件)
Sam Chak
2025 年 4 月 23 日
Here is an example of how you can send the output of a fuzzy system to a function:
%% load a fuzzy system
fis = readfis("tipper");
%% input values
Service = 8;
Food = 4;
%% output of the Fuzzy Tipper
Tip = evalfis(fis, [Service, Food])
%% write a super simple function
function howMuchTipDoIPay(service, food, tip)
formatSpec = 'If the Service is %d and the Food is %d, then the Tip should be %.4f.';
fprintf(formatSpec, service, food, tip)
end
%% send the fuzzy output (as well as inputs) to a function
howMuchTipDoIPay(Service, Food, Tip)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fuzzy Logic Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!