%% Create Sugeno FIS with Linear Output Memberhsip Functions
% Load a Sugeno FIS from a file.

fis = readfis('sugeno1');

%
% The output variable has two membership functions. View the properties of the first membership function.

fis.Outputs(1).MembershipFunctions(1)

%
% View the properties of the second membership function.

fis.Outputs(1).MembershipFunctions(2)

%
% The input membership functions and rules define which of these output functions are expressed and when.

fis.Rules

%
% Plot the input membership functions of this system. The low membership function generally refers to input values less than zero, while high refers to values greater than zero.

plotmf(fis,'input',1)

%
% Plot the output surface for this FIS.

gensurf(fis)

% The overall fuzzy system output switches smoothly from the line called line1 to the line called line2.
%
% Copyright 2019 The MathWorks, Inc.