getfis
(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.
Syntax
Description
returns the value of the specified property of the fuzzy inference
system.fisInfo
= getfis(sys
,fisProperty
)
Examples
Display Properties of Fuzzy Inference System
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
Obtain Fuzzy Inference System Properties
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');
Obtain Variable Properties
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');
Obtain Membership Function Properties
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
sys
— Fuzzy inference system
FIS structure
Fuzzy 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 index
positive integer
Variable 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 index
positive integer
Membership 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.
Output Arguments
fisInfo
— Fuzzy inference system information
structure  character vector  nonnegative integer  array
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:

varInfo
— Variable information
structure  character vector  nonnegative integer  row vector of length 2
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. 
mfInfo
— Membership function information
structure  character vector  row vector
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 R2006aR2019b: Support for fuzzy inference system structures will be removed
Support for representing fuzzy inference systems as structures will be removed in a future
release. Use mamfis
and sugfis
objects with
this function instead. To convert existing fuzzy inference system structures to objects, use
the convertfis
function.
This change was announced in R2018b. Using fuzzy inference system structures with this function issues a warning starting in R2019b.
R2018b: To be removed
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
.
R2017a: Returns FIS properties in a structure
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 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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)