getfis
(Removed) Get fuzzy system properties
getfis has been removed. Access fuzzy inference system properties
using dot notation instead. For more information, see Version
History.
Syntax
Description
Examples
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');
Input Arguments
Fuzzy inference system, specified as a FIS structure.
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
Variable type, specified as either 'input' or
'output', for input and output variables,
respectively.
Variable index, specified as a positive integer.
Variable property, specified as one of the following:
'name'— Variable name'range'— Variable value range'nummfs'— Number of membership functions
Membership function index, specified as a positive integer.
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.
Output Arguments
Fuzzy 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:
|
Variable 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. |
Membership 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.
Version History
Introduced before R2006agetfis has been removed. Access fuzzy inference system
properties using dot notation instead. For more information on fuzzy inference
system objects, see mamfis and
sugfis.
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 |
getfis issues a warning that it will be removed in a future
release.
getfis runs without warning, but Code Analyzer indicates that
getfis will be removed in a future release.
Starting in R2017a, the following getfis syntaxes have a new
behavior.
| Syntax | Previous Behavior | New Behavior |
|---|---|---|
getfis(fis) | Print formatted list of FIS properties to Command Window, and return FIS name. | Print formatted list of FIS properties to Command Window. |
getfis(fis,varType,varIndex) | Print formatted list variable properties to Command Window, and return structure that contains variable properties. | Return structure that contains variable properties. |
getfis(fis,varType,varIndex,'mf',mfIndex) | Print formatted list membership function properties to Command Window, and return structure that contains membership function properties. | Return structure that contains membership function properties. |
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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)