%% Create Fuzzy Rule Using Text Description
% Create a fuzzy rule using a verbose text description.

rule = fisrule("if service is poor and food is delicious then tip is average (1)");

% Alternatively, you can specify the same rule using a symbolic text description.

rule = fisrule("service==poor & food==delicious => tip=average")

% Before using rule with a fuzzy system, update the rule Antecedent and Consequent properties using the update function.

fis = readfis("tipper");
rule = update(rule,fis)

% Copyright 2018 The MathWorks, Inc.