addvar

Add variable to Fuzzy Inference System

Syntax

a = addvar(a,'varType','varName',varBounds) 

Description

addvar has four arguments in this order:

  • The name of a FIS structure in the MATLAB® workspace

  • A string representing the type of the variable you want to add ('input' or 'output')

  • A string representing the name of the variable you want to add

  • The vector describing the limiting range values for the variable you want to add

Indices are applied to variables in the order in which they are added, so the first input variable added to a system is always known as input variable number one for that system. Input and output variables are numbered independently.

Examples

expand all

Add Variable to Fuzzy Inference System

a = newfis('tipper');
a = addvar(a,'input','service',[0 10]);
getfis(a,'input',1)
      Name =     service
      NumMFs =   0
      MFLabels = 
      Range =    [0 10]

ans = 

      Name: 'service'
    NumMFs: 0
     range: [0 10]

See Also

| | |

Was this topic helpful?