%% Add Rules to Fuzzy Inference System
% Load a fuzzy inference system (FIS).

fis = readfis('tipper');

%
% Specify if-then rules using linguistic expressions.

rule1 = "If service is poor or food is rancid then tip is cheap";
rule2 = "If service is excellent and food is not rancid then tip is generous";
rules = [rule1 rule2];

%
% Add the rules to the FIS.

fis2 = addRule(fis,rules);

% fis2 is equivalent to fis, except that the specified rules are added to the rule base.
%
% Copyright 2018 The MathWorks, Inc.