This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


(To be removed) Generate Fuzzy Inference System structure from data using grid partition


genfis1 will be removed in a future release. Use genfis instead.


fismat = genfis1(data) 
fismat = genfis1(data,numMFs,inmftype,outmftype) 


genfis1 generates a Sugeno-type FIS structure used as initial conditions (initialization of the membership function parameters) for anfis training.

genfis1(data) generates a single-output Sugeno-type fuzzy inference system using a grid partition on the data.

genfis1(data,numMFs,inmftype,outmftype) generates an FIS structure from a training data set, data, with the number and type of input membership functions and the type of output membership functions explicitly specified.

The arguments for genfis1 are as follows:

  • data is the training data matrix, which must be entered with all but the last columns representing input data, and the last column representing the single output.

  • numMFs is a vector whose coordinates specify the number of membership functions associated with each input. If you want the same number of membership functions to be associated with each input, then specify numMFs as a single number.

  • inmftype is a character array in which each row specifies the membership function type associated with each input. This can be a character vector if the type of membership functions associated with each input is the same.

  • outmftype is a character vector that specifies the membership function type associated with the output. There can only be one output, because this is a Sugeno-type system. The output membership function type must be either linear or constant. The number of membership functions associated with the output is the same as the number of rules generated by genfis1.

The default number of membership functions, numMFs, is 2; the default input membership function type is 'gbellmf'; and the default output membership function type is 'linear'. These are used whenever genfis1 is invoked without the last three arguments.

The following table summarizes the default inference methods.

Inference MethodDefault
AND prod
Implication prod


Generate FIS Using Grid Partitioning

Generate a FIS using grid partitioning.

data = [rand(10,1) 10*rand(10,1)-5 rand(10,1)];
numMFs = [3 7];
mfType = char('pimf','trimf');
fismat = genfis1(data,numMFs,mfType);

To see the contents of fismat, use showfis(fismat).

Plot the FIS input membership functions.

[x,mf] = plotmf(fismat,'input',1);
subplot(2,1,1), plot(x,mf)
xlabel('input 1 (pimf)')
[x,mf] = plotmf(fismat,'input',2);
subplot(2,1,2), plot(x,mf)
xlabel('input 2 (trimf)')

See Also

| |

Introduced before R2006a

Was this topic helpful?