%% Create a Tree of Connected Fuzzy Inference Systems
% Create a Mamdani fuzzy inference system and a Sugeno fuzzy inference system.

fis1 = mamfis('Name','fis1','NumInputs',2,'NumOutputs',1);
fis2 = sugfis('Name','fis2','NumInputs',2,'NumOutputs',1);

% Define the desired connections between the two fuzzy inference systems.

con1 = ["fis1/output1" "fis2/input1"];
con2 = ["fis1/input1" "fis1/input2"];

% Create a tree of fuzzy inference systems.

tree = fistree([fis1 fis2],[con1; con2])

% Copyright 2018 The MathWorks, Inc.