(To be removed) Get fuzzy system properties
getfis will be removed in a future release. Access fuzzy
inference system properties using dot notation instead. For more information, see Compatibility Considerations.
returns the value of the specified property of the fuzzy inference
system.fisInfo = getfis(sys,fisProperty)
Load a fuzzy inference system.
sys = readfis('tipper');Display the system properties.
getfis(sys)
Name = tipper
Type = mamdani
NumInputs = 2
InLabels =
service
food
NumOutputs = 1
OutLabels =
tip
NumRules = 3
AndMethod = min
OrMethod = max
ImpMethod = min
AggMethod = max
DefuzzMethod = centroid
Load fuzzy system.
sys = readfis('tipper');Obtain the system properties.
prop = getfis(sys);
To obtain the value of a given property, specify the property name. For example, obtain the type of the fuzzy system.
type = getfis(sys,'type');Load fuzzy system.
sys = readfis('tipper');Obtain the properties of the first input variable.
prop = getfis(sys,'input',1);To obtain the value of a given property, specify the property name. For example, obtain the range of the output variable.
range = getfis(sys,'output',1,'range');
Load fuzzy system.
sys = readfis('tipper');For the second input variable, obtain the properties of its first membership function.
prop = getfis(sys,'input',2,'mf',1);
To obtain the value of a given property, specify the property name. For example, obtain the parameters of the second membership function of the output variable.
params = getfis(sys,'output',1,'mf',2,'params');
sys — Fuzzy inference systemFuzzy inference system, specified as an FIS structure.
fisProperty — Fuzzy inference system property'name' | 'type' | 'numInputs' | 'numOutputs' | ...Fuzzy inference system property, specified as one of the following:
'name' — FIS name
'type' — FIS type
'numInputs' — Number of inputs
'numOutputs'— Number of outputs
'numRules' — Number of fuzzy rules.
'andMethod' — And method
'orMethod' — Or method
'defuzzMethod' — Defuzzification method
'impMethod' — Implication method
'aggMethod' — Aggregation method
'ruleList' — List of fuzzy rules
varType — Variable type'input' | 'output'Variable type, specified as either 'input' or
'output', for input and output variables,
respectively.
varIndex — Variable indexVariable index, specified as a positive integer.
varProperty — Variable property'name' | 'range' | 'nummfs'Variable property, specified as one of the following:
'name' — Variable name
'range' — Variable value range
'nummfs' — Number of membership
functions
mfIndex — Membership function indexMembership function index, specified as a positive integer.
mfProperty — Membership function property'name' | 'type' | 'params'Membership function property, specified as one of the following:
'name' — Membership function name
'type' — Membership function type
'params' — Membership function
parameters
For more information on membership functions, see Membership Functions.
fisInfo — Fuzzy inference system informationFuzzy inference system information, returned as a structure, character
vector, nonnegative integer, or array, depending on the value of
fisProperty.
If you do not specify fisProperty, then
fisInfo is returned as a structure with the
following fields.
| Field | Description |
|---|---|
name | FIS name, returned as a character vector. |
type | FIS type, returned as a character vector. |
andMethod | AND fuzzy operator method, returned as a character vector. |
orMethod | OR fuzzy operator method, returned as a character vector. |
defuzzMethod | Defuzzification method, returned as a character vector. |
impMethod | Implication method, returned as a character vector. |
aggMethod | Aggregation method, returned as a character vector. |
input | Input variable information, returned as a structure or structure array. Each input variable structure contains the following fields:
|
output | Output variable information, returned as a structure or structure array. Each output variable structure contains the following fields:
|
rule | Fuzzy rule list, returned as a structure or structure array. Each rule structure contains the following fields:
|
Otherwise, the value of fisInfo depends on the value
of fisProperty according to the following table.
fisProperty | fisInfo |
|---|---|
'name' | FIS name, returned as a character vector. |
'type' | FIS type, returned as one of the following:
|
'numinputs' | Number of input variables, returned as a nonnegative integer. |
'numiutputs' | Number of output variables, returned as a nonnegative integer. |
'numrules' | Number of fuzzy rules, returned as a nonnegative integer. |
'andmethod' | AND fuzzy operator method, returned as one of the following:
|
'ormethod' | OR fuzzy operator method, returned as one of the following:
|
'defuzzmethod' | Defuzzification method for computing crisp output values, returned as one of the following for Mamdani systems:
For Sugeno systems, specify the defuzzification method as one of the following:
The defuzzification method can also be returned as a character vector that contains the name of a custom defuzzification function in the current working folder or on the MATLAB path. |
'impmethod' | Implication method for computing consequent fuzzy set, returned as one of the following:
|
'aggmethod' | Aggregation method for combining rule consequents, returned as one of the following:
|
'rulelist' | Fuzzy rule list, returned as an array. For each fuzzy rule, the rule list contains one row with the following columns:
|
varInfo — Variable informationVariable information, returned as a structure, nonnegative integer,
character vector, or row vector, depending on the value of
varProperty.
If you do not specify varProperty, then
varInfo is returned as a structure with the
following fields.
| Field | Description |
|---|---|
Name | Variable name, returned as a character vector. |
NumMFs | Number of membership functions, returned as a nonnegative integer. |
mf1, mf2, ...,
mfN | Membership function names, returned as character vectors.
mfInfo contains one field for each
membership function. |
range | Variable range, returned as a row vector of length 2. |
Otherwise, the value of varInfo depends on the value
of varProperty according to the following table.
varProperty | varInfo |
|---|---|
'name' | Variable name, returned as a character vector. |
'nummfs' | Number of membership functions, returned as a nonnegative integer. |
'range' | Variable range, returned as a row vector of length 2. |
mfInfo — Membership function informationMembership function information, returned as a structure, character
vector, or row vector, depending on the value of
mfProperty.
If you do not specify mfProperty, then
mfInfo is returned as a structure with the
following fields.
| Field | Description |
|---|---|
Name | Membership function name, returned as a character vector. |
Type | Membership function type, returned as a character vector. |
params | Membership function parameters, returned as a row vector. |
Otherwise, the value of mfInfo depends on the value
of mfProperty according to the following table.
mfProperty | mfInfo |
|---|---|
'name' | Membership function name, returned as a character vector. |
'type' | Membership function type, returned as a character vector. |
'params' | Membership function parameters, returned as a row vector. |
For more information on membership function, see Membership Functions.
getfis will be removedNot recommended starting in R2018b
getfis will be removed in a future release. Access fuzzy
inference system properties using dot notation instead. There are differences
between these approaches that require updates to your code.
This table shows some typical usages of getfis for
accessing fuzzy inference system properties and how to update your code to use
dot notation instead.
| If your code has this form: | Use this code instead: |
|---|---|
get(fis,'andmethod') |
fis.AndMethod |
getfis(fis,'input',1) |
fis.Inputs(1) |
getfis(fis,'input',1,'name') |
fis.Inputs(1).Name |
getfis(fis,'input',2,'mf',1) |
fis.Inputs(2).MembershipFunctions(1) |
getfis(fis,'input',2,'mf',1,...
params) |
fis.Inputs(2).MembershipFunctions(1).Parameters |
Previously, fuzzy inference systems were represented as structures. Now, fuzzy
inference systems are represented as objects. Fuzzy inference system object
properties have different names than the corresponding structure fields. For
more information on fuzzy inference system objects, see mamfis
and sugfis.