%% Create Multiple Fuzzy Rules
% Create a string array of text rule descriptions.

rules1 = ["if service is poor or food is rancid then tip is cheap (0.5)"...
          "if service is excellent and food is not rancid then tip is generous (0.75)"];

% Create an array of fuzzy rules using these descriptions.

fuzzyRules1 = fisrule(rules1)

% Alternatively, you can specify multiple rules using an array of numeric rule descriptions.

rules2 = [1 1 1 0.5 2;
          2 -1 3 0.75 1];
fuzzyRules2 = fisrule(rules2,2)

% Copyright 2018 The MathWorks, Inc.