Main Content


Convert type-1 fuzzy inference system into type-2 fuzzy inference system

Since R2019b



fisT2 = convertToType2(fisT1) converts the type-1 fuzzy inference system fisT1 into a type-2 fuzzy inference system fisT2.


collapse all

Create a type-1 fuzzy inference system. For this example, load the tipper.fis file.

fisT1 = readfis('tipper');

View the membership function for the first input variable.


Convert fisT1 into a type-2 fuzzy inference system.

fisT2 = convertToType2(fisT1);

View the converted membership functions for the first input variable.


To create a type-2 FIS from input/output data, you must first create a type-1 FIS using genfis.

Load training data and generate a FIS using subtractive clustering.

load clusterDemo.dat
inputData = clusterDemo(:,1:2);
outputData = clusterDemo(:,3);
opt = genfisOptions('SubtractiveClustering',...
                    'ClusterInfluenceRange',[0.5 0.25 0.3]);
fisT1 = genfis(inputData,outputData,opt);
ans = 
  fisvar with properties:

                   Name: "out1"
                  Range: [-0.1274 1.1458]
    MembershipFunctions: [1x3 fismf]

Convert the generated FIS to a type-2 FIS.

fisT2 = convertToType2(fisT1);

Since the initial type-1 FIS is a Sugeno system, only the input MFs are converted to type-2 MFs.

Input Arguments

collapse all

Type-1 fuzzy inference system, specified as a mamfis or sugfis object.

Output Arguments

collapse all

Type-2 fuzzy inference system, returned as one of the following:

The properties of fisT2 match the corresponding properties of fisT1, except that each type-1 membership function (except for Sugeno output membership functions) is converted to a type-2 membership function. The upper membership function parameters of each type-2 membership function in fisT2 match the membership function parameters of the corresponding type-1 membership function in fisT1.

fisT2 has default LowerScale and LowerLag values and uses the default "karnikmendel" type reduction method.

Alternative Functionality


You can interactively convert a type-1 FIS into a type-2 FIS using the Fuzzy Logic Designer app. You can then export the system to the MATLAB® workspace.

Version History

Introduced in R2019b