Main Content

plotfis

Display fuzzy inference system

Description

FIS Object

example

plotfis(fis) displays a high-level diagram of a type-1 or type-2 fuzzy inference system (FIS). The center of the display shows the name, type, and rule count for the FIS. The input variables with their associated membership functions are displayed on the left, and the outputs with their associated membership functions are displayed on the right.

FIS Tree

example

plotfis(tree) displays a high-level diagram of a tree of interconnected FIS objects. The display shows the inputs, outputs, component FIS objects, and connections of the specified fistree object.

example

plotfis(tree,Legend="on") displays information about the inputs, outputs, and connections of the specified fistree object by adding a legend to the display.

Examples

collapse all

Create a fuzzy inference system (FIS). For this example, read the FIS from the tipper.fis file.

fis = readfis('tipper');

Display the fuzzy system.

plotfis(fis)

Figure contains 4 axes objects. Axes object 1 contains 3 objects of type line. Axes object 2 contains 2 objects of type line. Axes object 3 contains 3 objects of type line. Axes object 4 contains 3 objects of type text.

The figure shows the FIS name and type, along with the number of rules. Also, for each input and output variable, the name and membership function configuration are shown.

Create a fistree object from three fuzzy inference systems and their connections.

fis1 = mamfis('Name','fis1','NumInputs',2,'NumOutputs',1);
fis2 = sugfis('Name','fis2','NumInputs',2,'NumOutputs',2);
fis3 = sugfis('Name','fis3','NumInputs',3,'NumOutputs',1);
con1 = ["fis1/output1" "fis3/input1"];
con2 = ["fis2/output1" "fis3/input2"];
con3 = ["fis1/input2" "fis2/input1"];

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

Display the fistree object with a legend.

plotfis(tree,Legend="on")

In this display, free inputs are the inputs without any incoming connections. You must specify these inputs when you evaluate the FIS tree. The free and intermediate output values are returned when you evaluate the FIS tree.

You can also plot the FIS tree without a legend.

plotfis(tree)

Input Arguments

collapse all

Fuzzy inference system, specified as one of the following:

  • mamfis object — Mamdani fuzzy inference system

  • sugfis object — Sugeno fuzzy inference system

  • mamfistype2 object — Type-2 Mamdani fuzzy inference system

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system

Tree of interconnected fuzzy inference systems, specified as a fistree object.

Compatibility Considerations

expand all

Behavior changed in R2021b

Warns starting in R2019b

Introduced before R2006a