Function Reference: addvar

Function File: fis = addvar (fis, in_or_out, var_name, var_range)

Add an input or output variable to an existing FIS structure and return the updated FIS.

The types/values of the arguments are expected to be:

ArgumentExpected Type or Value
fisan FIS structure
in_or_outeither ’input’ or ’output’ (case-insensitive)
var_namea string
var_rangea vector [x1 x2] of two real numbers

The vector components x1 and x2, which must also satisfy x1 <= x2, specify the lower and upper bounds of the variable’s domain.

To run the demonstration code, type "demo addvar" (without the quotation marks) at the Octave prompt.

Example: 1

 

 a = newfis ('Heart-Disease-Risk', 'sugeno', ...
             'min', 'max', 'min', 'max', 'wtaver');
 a = addvar (a, 'input', 'LDL-Level', [0 300]);
 getfis (a, 'input', 1);

Name = LDL-Level
NumMFs = 0
MFLabels = 
Range = [0 300]