Main Content

removeOutput

Remove output variable from fuzzy inference system

Description

fisOut = removeOutput(fisIn,outputName) removes the output variable with the name outputName from fuzzy inference system fisIn and returns the resulting fuzzy system in fisOut.

example

Examples

collapse all

Load fuzzy system.

fis = readfis("mam22");

View the output variables of fis.

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

    Name
    Range
    MembershipFunctions

  Details:
           Name       Range      MembershipFunctions
         ________    ________    ___________________

    1    "force"     -5     5        {1x4 fismf}    
    2    "force2"    -5     5        {1x4 fismf}    

View the rules of fis.

fis.Rules
ans = 
  1x4 fisrule array with properties:

    Description
    Antecedent
    Consequent
    Weight
    Connection

  Details:
                                      Description                              
         ______________________________________________________________________

    1    "angle==small & velocity==small => force=negBig, force2=posBig2 (1)"  
    2    "angle==small & velocity==big => force=negSmall, force2=posSmall2 (1)"
    3    "angle==big & velocity==small => force=posSmall, force2=negSmall2 (1)"
    4    "angle==big & velocity==big => force=posBig, force2=negBig2 (1)"      

Remove the forceBig output variable.

fis = removeOutput(fis,"force2");

View the updated output variables.

fis.Outputs
ans = 
  fisvar with properties:

                   Name: "force"
                  Range: [-5 5]
    MembershipFunctions: [1x4 fismf]

View the updated rules.

fis.Rules
ans = 
  1x4 fisrule array with properties:

    Description
    Antecedent
    Consequent
    Weight
    Connection

  Details:
                             Description                     
         ____________________________________________________

    1    "angle==small & velocity==small => force=negBig (1)"
    2    "angle==small & velocity==big => force=negSmall (1)"
    3    "angle==big & velocity==small => force=posSmall (1)"
    4    "angle==big & velocity==big => force=posBig (1)"    

force2 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

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system

Output 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

Go to top of page