%% Add Rules to Fuzzy Inference System
% Create the fuzzy inference system. For this example, load the tipper FIS and clear the existing rules for the FIS.

sys = readfis('tipper');
sys.rule = [];

%
% Create a rule list.

rule1 = [1 1 1 1 1];
rule2 = [1 2 2 1 1];
ruleList = [rule1;rule2];

%
% Add the rule list to the FIS.

sys = addrule(sys,ruleList);

%
% Verify that the rules were added.

showrule(sys)

% Copyright 2015 The MathWorks, Inc.