Remove input variable from fuzzy inference system
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
.
fisIn
— Fuzzy inference systemmamfis
object | sugfis
object | mamfistype2
object | sugfistype2
objectFuzzy 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
inputName
— Input variable nameInput variable name, specified as a string or character vector.
fisOut
— Fuzzy inference systemmamfis
object | sugfis
object | mamfistype2
object | sugfistype2
objectFuzzy 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
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.
You have a modified version of this example. Do you want to open this example with your edits?