Main Content

removeOutput

Remove output variable from fuzzy inference system

Description

fis = removeOutput(fis,outputName) removes the output variable with the name outputName from fuzzy inference system fis.

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

example

Examples

collapse all

Load fuzzy system.

fis = readfis("mam22");

View the output variables of fis.

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

    Name
    Range
    MembershipFunctions

  Details:
           Name       Range      MembershipFunctions
         ________    ________    ___________________

    1    "force"     -5     5        {1×4 fismf}    
    2    "force2"    -5     5        {1×4 fismf}    

View the rules of fis.

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

View the updated rules.

fis.Rules
ans = 
  1×4 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 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

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

Version History

Introduced in R2018b

expand all