This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

removeInput

Remove input variable from fuzzy inference system

Syntax

fisOut = removeInput(fisIn,inputName)

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 a mamfis or sugfis object.

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

Output Arguments

collapse all

Fuzzy inference system, returned as a mamfis or sugfis object. 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.

Introduced in R2018b