Main Content

removeInput

Remove input variable from fuzzy inference system

Description

fis = removeInput(fis,inputName) removes the input variable with the name inputName from fuzzy inference system fis.

The specified input variable is removed from any fuzzy rules. If a rule has only the specified input variable in its antecedent, then the entire rule is removed. If a rule has more than one input variable in its antecedent, then the specified input variable is removed from the antecedent.

example

Examples

collapse all

Load fuzzy system.

fis = readfis("tipper");

View the input variables of fis.

fis.Inputs
ans = 
  1×2 fisvar array with properties:

    Name
    Range
    MembershipFunctions

  Details:
           Name        Range     MembershipFunctions
         _________    _______    ___________________

    1    "service"    0    10        {1×3 fismf}    
    2    "food"       0    10        {1×2 fismf}    

View the rules of fis.

fis.Rules
ans = 
  1×3 fisrule array with properties:

    Description
    Antecedent
    Consequent
    Weight
    Connection

  Details:
                                Description                        
         __________________________________________________________

    1    "service==poor | food==rancid => tip=cheap (1)"           
    2    "service==good => tip=average (1)"                        
    3    "service==excellent | food==delicious => tip=generous (1)"

Remove the service input variable.

fis = removeInput(fis,"service");

View the updated input variables.

fis.Inputs
ans = 
  fisvar with properties:

                   Name: "food"
                  Range: [0 10]
    MembershipFunctions: [1×2 fismf]

View the updated rules.

fis.Rules
ans = 
  1×2 fisrule array with properties:

    Description
    Antecedent
    Consequent
    Weight
    Connection

  Details:
                      Description             
         _____________________________________

    1    "food==rancid => tip=cheap (1)"      
    2    "food==delicious => tip=generous (1)"

service has been removed from the variables and rules of fis.

Input Arguments

collapse all

Fuzzy inference system, specified as one of these objects:

  • mamfis — Mamdani fuzzy inference system

  • sugfis — Sugeno fuzzy inference system

  • mamfistype2 — Type-2 Mamdani fuzzy inference system

  • sugfistype2 — Type-2 Sugeno fuzzy inference system

Input variable name, specified as a string or character vector.

Version History

Introduced in R2018b

expand all