newfis
(Removed) Create new fuzzy inference system
newfis
has been removed. Use mamfis
or
sugfis
instead. For more information, see Version
History.
Description
Examples
Create Fuzzy Inference System
Create a default Mamdani fuzzy inference system with the name,
'fis'
.
sys = newfis('fis')
sys = struct with fields:
name: 'fis'
type: 'mamdani'
andMethod: 'min'
orMethod: 'max'
defuzzMethod: 'centroid'
impMethod: 'min'
aggMethod: 'max'
input: []
output: []
rule: []
Create Sugeno Fuzzy Inference System
Create a default Sugeno fuzzy inference system with the name,
'fis'
.
sys = newfis('fis','FISType','sugeno')
sys = struct with fields:
name: 'fis'
type: 'sugeno'
andMethod: 'prod'
orMethod: 'probor'
defuzzMethod: 'wtaver'
impMethod: 'prod'
aggMethod: 'sum'
input: []
output: []
rule: []
Specify Implication Methods for New Fuzzy Inference System
Create a Mamdani fuzzy inference system that uses
'bisector'
defuzzification and
'prod'
implication.
sys = newfis('fis','DefuzzificationMethod','bisector',... 'ImplicationMethod','prod');
Input Arguments
name
— Fuzzy inference system name
character vector | string
Fuzzy inference system name, specified as a character vector or string.
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'OrMethod'
,'probor'
configures the
fuzzy OR operator as a probabilistic OR function.
FISType
— Fuzzy inference system type
'mamdani'
(default) | 'sugeno'
Fuzzy inference system type, specified as one of the following:
'mamdani'
— Mamdani-type fuzzy system'sugeno'
— Sugeno-type fuzzy system
For more information on the types of fuzzy inference systems, see Mamdani and Sugeno Fuzzy Inference Systems.
AndMethod
— AND fuzzy operator method
'min'
| 'prod'
| character vector | string
AND fuzzy operator method, specified as one of the following:
'min'
— Minimum of fuzzified input values. This method is the default whenFISType
is'mamdani'
.'prod'
— Product of fuzzified input values. This method is the default whenFISType
is'sugeno'
.Character vector or string — Name of a custom AND function in the current working folder or on the MATLAB® path. For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.
For more information on fuzzy operators and the fuzzy inference process, see Fuzzy Inference Process.
OrMethod
— OR fuzzy operator method
'max'
| 'probor'
| character vector | string
OR fuzzy operator method, specified as one of the following:
'max'
— Maximum of fuzzified input values. This method is the default whenFISType
is'mamdani'
.'probor'
— Probabilistic OR of fuzzified input values. For more information, seeprobor
. This method is the default whenFISType
is'sugeno'
.Character vector or string — Name of a custom OR function in the current working folder or on the MATLAB path. For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.
For more information on fuzzy operators and the fuzzy inference process, see Fuzzy Inference Process.
ImplicationMethod
— Implication method
'min'
| 'prod'
| character vector | string
Implication method for computing consequent fuzzy set, specified as one of the following:
'min'
— Truncate the consequent membership function at the antecedent result value. This method is the default whenFISType
is'mamdani'
.'prod'
— Scale the consequent membership function by the antecedent result value. This method is the default whenFISType
is'sugeno'
.Character vector or string — Name of a custom implication function in the current working folder or on the MATLAB path. For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.
Note
No matter what implication method you specify, Sugeno systems
always use 'prod'
aggregation.
For more information on implication and the fuzzy inference process, see Fuzzy Inference Process.
AggregationMethod
— Aggregation method
'max'
| 'sum'
| character vector | string
Aggregation method for combining rule consequents, specified as one of the following:
'max'
— Maximum of consequent fuzzy sets. This method is the default whenFISType
is'mamdani'
.'sum'
— Sum of consequent fuzzy sets. This method is the default whenFISType
is'sugeno'
.'probor'
— Probabilistic OR of consequent fuzzy sets. For more information, seeprobor
.Character vector or string — Name of a custom aggregation function in the current working folder or on the MATLAB path. For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.
Note
No matter what aggregation method you specify, Sugeno systems
always use 'sum'
aggregation.
For more information on aggregation and the fuzzy inference process, see Fuzzy Inference Process.
DefuzzificationMethod
— Defuzzification method
'centroid'
| 'bisector'
| 'mom'
| 'lom'
| 'som'
| 'wtaver'
| 'wtsum'
| character vector | string
Defuzzification method for computing crisp output values.
If FISType
is 'mamdani'
, specify
the defuzzification method as one of the following:
'centroid'
— Centroid of the area under the output fuzzy set. This method is the default for Mamdani systems.'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
If FISType
is 'sugeno'
, specify
the defuzzification method as one of the following:
'wtaver'
— Weighted average of all rule outputs. This method is the default for Sugeno systems.'wtsum'
— Weighted sum of all rule outputs
You can also specify the defuzzification method using a character vector or string that contains the name of a custom function in the current working folder or on the MATLAB path. For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.
For more information on defuzzification and the fuzzy inference process, see Fuzzy Inference Process.
Output Arguments
fis
— Fuzzy inference system
FIS structure
Fuzzy inference system with the specified name
,
returned as a FIS structure. The fuzzy system is configured using the
specified Name,Value
pair arguments.
fis
has no input variables, output variables, or
rules. To add variables or rules to fis
, use addvar
or addRule
. You can also edit the
fuzzy system using Fuzzy Logic Designer.
Version History
Introduced before R2006aR2024b: Removed
newfis
has been removed. To create a Mamdani or Sugeno FIS,
use mamfis
or
sugfis
,
respectively.
This table shows some typical usages of newfis
for creating
fuzzy systems and how to update your code to use mamfis
or
sugfis
instead.
If your code has this form: | Use this code instead: |
---|---|
fis = newfis(name) |
fis = mamfis('Name',name) |
fis = newfis(name,'FISType','mamdani') |
fis = mamfis('Name',name) |
fis = newfis(name,'FISType','sugeno') |
fis = sugfis('Name',name) |
fis = newfis(name,... 'FISType','mamdani',... 'AndMethod','prod') |
fis = mamfis('Name',name,... 'AndMethod','prod') |
fis = newfis(name,... 'FISType','sugeno',... 'OrMethod','probor') |
fis = sugfis('Name',name,... 'OrMethod','probor') |
R2019b: Warns
newfis
issues a warning that it will be removed in a future
release.
R2018b: To be removed
newfis
runs without warning, but Code Analyzer indicates that
newfis
will be removed in a future release.
R2017a: Specify options using name-value pair arguments
To specify options for creating new fuzzy inference systems, you now use name-value pair arguments. Any name-value pair arguments that you do not specify remain at their default values.
Previously, you specified options using optional input arguments.
fis = newfis('My FIS',fisType,andMethod,orMethod,impMethod,aggMethod,defuzzMethod);
Starting in R2017a, modify your code to use one or more name-value pair arguments. For example, create a Mamdani FIS with default options.
fis = newfis('My FIS','FISType','mamdani');
The following table shows the mapping of the old input arguments to the new name-value pair arguments.
Old Input Argument | New Name-Value Argument |
---|---|
fisType | 'FISType' |
andMethod | 'AndMethod' |
orMethod | 'OrMethod' |
impMethod | 'ImplicationMethod' |
aggMethod | 'AggregationMethod' |
defuzzMethod | 'DefuzzificationMethod' |
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de 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)