Main Content

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.

Description

example

getfis(sys) prints the properties of the fuzzy inference system sys, to the Command Window.

example

fisInfo = getfis(sys) returns the properties of the specified fuzzy inference system.

example

fisInfo = getfis(sys,fisProperty) returns the value of the specified property of the fuzzy inference system.

example

varInfo = getfis(sys,varType,varIndex) returns the properties of the specified input or output variable of a fuzzy inference system.

example

varInfo = getfis(sys,varType,varIndex,varProperty) returns the value of the specified variable property.

example

mfInfo = getfis(sys,varType,varIndex,'mf',mfIndex) returns the properties of the specified membership function of an input or output variable.

example

mfInfo = getfis(sys,varType,varIndex,'mf',mfIndex,mfProperty) returns the value of the specified membership function property.

Examples

collapse all

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

collapse all

Fuzzy inference system, specified as an 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

collapse all

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.

FieldDescription
nameFIS name, returned as a character vector.
typeFIS type, returned as a character vector.
andMethodAND fuzzy operator method, returned as a character vector.
orMethodOR fuzzy operator method, returned as a character vector.
defuzzMethodDefuzzification method, returned as a character vector.
impMethodImplication 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:

  • name — Variable name

  • range — Variable range

  • mf — Membership function names

output

Output variable information, returned as a structure or structure array. Each output variable structure contains the following fields:

  • name — Variable name

  • range — Variable range

  • mf — Membership function names

rule

Fuzzy rule list, returned as a structure or structure array. Each rule structure contains the following fields:

  • antecedent — Input membership function indices

  • consequent — Output membership function indices

  • weight — Rule weight

  • connection — Fuzzy operator: 1 (AND), 2 (OR)

Otherwise, the value of fisInfo depends on the value of fisProperty according to the following table.

fisPropertyfisInfo
'name'

FIS name, returned as a character vector.

'type'

FIS type, returned as one of the following:

  • 'mamdani' — Mamdani-type fuzzy system

  • 'sugeno' — Sugeno-type fuzzy system

'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:

  • 'min' — Minimum of fuzzified input values

  • 'prod' — Product of fuzzified input values

  • Character vector — Name of a custom AND function in the current working folder or on the MATLAB® path

'ormethod'

OR fuzzy operator method, returned as one of the following:

  • 'max' — Maximum of fuzzified input values

  • 'probor' — Probabilistic OR of fuzzified input values

  • Character vector — Name of a custom OR function in the current working folder or on the MATLAB path

'defuzzmethod'

Defuzzification method for computing crisp output values, returned as one of the following for Mamdani systems:

  • 'centroid' — Centroid of the area under the output fuzzy set

  • 'bisector' — Bisector of the area under the output fuzzy set

  • 'mom' — Mean of the values for which the output fuzzy set is maximum

  • 'lom' — Largest value for which the output fuzzy set is maximum

  • 'som' — Smallest value for which the output fuzzy set is maximum

For Sugeno systems, specify the defuzzification method as one of the following:

  • 'wtaver' — Weighted average of all rule outputs

  • 'wtsum' — Weighted sum of all rule outputs

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:

  • 'min' — Truncate the consequent membership function at the antecedent result value.

  • 'prod' — Scale the consequent membership function by the antecedent result value.

  • Character vector — Name of a custom implication function in the current working folder or on the MATLAB path

'aggmethod'

Aggregation method for combining rule consequents, returned as one of the following:

  • 'max' — Maximum of consequent fuzzy sets

  • 'sum' — Sum of consequent fuzzy sets

  • 'probor' — Probabilistic OR of consequent fuzzy sets

  • Character vector — Name of a custom aggregation function in the current working folder or on the MATLAB path.

'rulelist'

Fuzzy rule list, returned as an array. For each fuzzy rule, the rule list contains one row with the following columns:

  • Nu columns of input membership function indices, where Nu is the number of inputs. If a given variable is not included in a rule, the corresponding column entry is 0. Negative values indicate a NOT operation.

  • Ny columns of output membership function indices, where Ny is the number of outputs. If a given variable is not included in a rule, the corresponding column entry is 0. Negative values indicate a NOT operation.

  • Rule weight

  • Fuzzy operator: 1 (AND), 2 (OR)

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.

FieldDescription
NameVariable name, returned as a character vector.
NumMFsNumber of membership functions, returned as a nonnegative integer.
mf1, mf2, ..., mfNMembership function names, returned as character vectors. mfInfo contains one field for each membership function.
rangeVariable 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.

varPropertyvarInfo
'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.

FieldDescription
NameMembership function name, returned as a character vector.
TypeMembership function type, returned as a character vector.
paramsMembership function parameters, returned as a row vector.

Otherwise, the value of mfInfo depends on the value of mfProperty according to the following table.

mfPropertymfInfo
'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 R2006a

expand all

R2019b: 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.

See Also

|