Main Content

removeInput

Remove input variable from fuzzy inference system

Description

example

fisOut = removeInput(fisIn,inputName) removes the input variable with the name inputName from fuzzy inference system fisIn and returns the resulting fuzzy system in fisOut.

Examples

collapse all

Load fuzzy system.

fis = readfis("tipper");

View the input variables of fis.

fis.Inputs
ans = 
  1x2 fisvar array with properties:

    Name
    Range
    MembershipFunctions

  Details:
           Name        Range     MembershipFunctions
         _________    _______    ___________________

    1    "service"    0    10        {1x3 fismf}    
    2    "food"       0    10        {1x2 fismf}    

View the rules of fis.

fis.Rules
ans = 
  1x3 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: [1x2 fismf]

View the updated rules.

fis.Rules
ans = 
  1x2 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 the following:

  • mamfis object — Mamdani fuzzy inference system

  • sugfis object — Sugeno fuzzy inference system

  • mamfistype2 object — Type-2 Mamdani fuzzy inference system (since R2019b)

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system (since R2019b)

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

Output Arguments

collapse all

Updated fuzzy inference system, returned as one of the following objects.

  • mamfis object — Mamdani fuzzy inference system

  • sugfis object — Sugeno fuzzy inference system

  • mamfistype2 object — Type-2 Mamdani fuzzy inference system

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system

fisOut has the same properties as fisIn except:

  • The input variable with the specified name is removed.

  • 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.

Version History

Introduced in R2018b

expand all