%% Add Single Rule to Fuzzy Inference System
% Load a fuzzy inference system (FIS), and clear the existing rules.

fis = readfis('tipper');
fis.Rules = [];

%
% Add a rule to the FIS.

ruleTxt = 'If service is poor then tip is cheap';
fis2 = addRule(fis,ruleTxt);

% fis2 is equivalent to fis, except that the specified rule is added to the rule base.

fis2.Rules

%
% Copyright 2018 The MathWorks, Inc.