%% Convert FIS Object into Homogeneous Structure
% Create a fuzzy inference system. For this example, load a fuzzy system from a file.

fisObject = readfis('tipper');

% Convert the resulting mamfis object into a homogeneous structure.

fisStructure = getFISCodeGenerationData(fisObject);

% In this structure, if a field is a structure array, all the elements of that array are the same size. For example, consider the elements of input variable array fisStructure.input.

fisStructure.input(1)

%

fisStructure.input(2)

% The name fields are character vectors of the same length. Also, even though the second input variable has only two membership functions, the mf fields both contain three membership function structures. The original number of membership functions for a given input variable is stored in the origNumMF field.
% Copyright 2018 The MathWorks, Inc.