addOutput
Add output variable to fuzzy inference system
Description
configures the output variable using one or more name-value pair arguments.fisOut
= addOutput(___,Name,Value
)
Examples
Add Output Variable to Fuzzy Inference System
Create a Mamdani fuzzy inference system.
fis = mamfis("Name","tipper");
Add an output variable with default specifications.
fis = addOutput(fis);
You can configure the output variable properties using dot notation. For example, specify the name and range for the variable.
fis.Outputs(1).Name = "tip";
fis.Outputs(1).Range = [10 30];
View the output variable.
fis.Outputs(1)
ans = fisvar with properties: Name: "tip" Range: [10 30] MembershipFunctions: [0x0 fismf]
You can also specify the variable name and range when you add it to the fuzzy system.
fis2 = mamfis("Name","tipper"); fis2 = addOutput(fis2,[10 30],"Name","tip");
Add Output Variable with Membership Functions
Create a Sugeno fuzzy inference system.
fis = sugfis('Name',"tipper");
Add an output variable with three constant membership functions distributed over the output range.
fis = addOutput(fis,'NumMFs',3,'MFType',"constant");
View the membership functions.
fis.Outputs(1).MembershipFunctions
ans = 1x3 fismf array with properties: Type Parameters Name Details: Name Type Parameters _____ __________ __________ 1 "mf1" "constant" 0 2 "mf2" "constant" 0.5 3 "mf3" "constant" 1
Input Arguments
fisIn
— Fuzzy inference system
mamfis
object | sugfis
object | mamfistype2
object | sugfistype2
object
Fuzzy inference system, specified as one of the following:
mamfis
object — Mamdani fuzzy inference systemsugfis
object — Sugeno fuzzy inference systemmamfistype2
object — Type-2 Mamdani fuzzy inference systemsugfistype2
object — Type-2 Sugeno fuzzy inference system
range
— Variable range
[0 1]
(default) | two-element vector
Variable range, specified as a two-element element vector where the first element is less than the second element. The first element specifies the lower bound of the range, and the second element specifies the upper bound of the range.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: fis = addOutput(fis,NumMFs=3)
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: fis = addOutput(fis,'NumMFs',3)
Name
— Variable name
string | character vector
Variable name, specified as a string or character vector.
NumMFs
— Number of membership functions
0
(default) | nonnegative integer
Number of membership functions, specified as a nonnegative integer.
MFType
— Membership function type
"trimf"
(default) | "gaussmf"
Membership function type, specified as one of the following values.
"trimf"
— Triangular membership functions for the outputs of Mamdani system"gaussmf"
— Gaussian membership functions for the outputs of Mamdani systems"constant"
— Constant membership functions for the outputs of Sugeno systems"linear"
— Linear membership functions for the outputs of Sugeno systems. To add an output variable with linear membership functions, your FIS must have at least one input variable.
The membership functions are uniformly distributed over the variable range with approximately 80% overlap in the membership function supports.
Output Arguments
fisOut
— Updated fuzzy inference system
mamfis
object | sugfis
object | mamfistype2
object | sugfistype2
object
Updated inference system, returned as one of the following objects.
mamfis
object — Mamdani fuzzy inference systemsugfis
object — Sugeno fuzzy inference systemmamfistype2
object — Type-2 Mamdani fuzzy inference systemsugfistype2
object — Type-2 Sugeno fuzzy inference system
fisOut
contains the added output variable, with all other
properties matching the properties of fisIn
.
Version History
Introduced in R2018bR2018b: Replaces addvar
This function replaces addvar
for adding output variables to a fuzzy
inference system.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)