%% Specify Data Hyperbox Scaling Range
% Obtain input and output training data.

Xin = [7*rand(50,1) 20*rand(50,1)-10];
Xout = 5*rand(50,1);

%
% Create a genfisOptions option set, and specify the scaling range for the inputs and outputs to normalize the data into the [0 1] range. Suppose that the input data has two columns, and the output data has one column. The ranges for the first and second input data columns and the output data are: [-10 +10], [-5 +5], and [0 20].

opt = genfisOptions('SubtractiveClustering',...
                    'DataScale',[-10 -5 0;10 5 20]);

%
% Generate the FIS using the training data and the specified options.

fismat = genfis(Xin,Xout,opt);

% Copyright 2012 The MathWorks, Inc.