evalfisOptions
Option set for evalfis
function
Description
Use an evalfisOptions
object to specify options for the
evalfis
function.
Creation
Description
creates an
option set for the opt
= evalfisOptionsevalfis
function with default options.
To modify the properties of this option set, use dot notation.
sets properties using name-value pairs. For example,
opt
= evalfisOptions(Name,Value
)evalfisOptions('NumSamplePoints',51)
creates an option
set and sets the number of output fuzzy set samples to 51
.
You can specify multiple name-value pairs. Enclose each property name in single
quotes.
Properties
NumSamplePoints
— Number of sample points in output fuzzy sets
101 (default) | integer greater than 1
Number of sample points in output fuzzy sets, specified as an integer
greater than 1
.
To reduce memory usage while evaluating a Mamdani FIS, specify fewer samples. Doing so sacrifices the accuracy of the defuzzified output value.
Reducing the number of samples can make the output area for defuzzification zero. In this case, the defuzzified output value is the midpoint of the output variable range.
Note
evalfis
ignores this property when evaluating a
Sugeno FIS.
OutOfRangeInputValueMessage
— Diagnostic message behavior when an input is out of range
"warning"
(default) | "error"
| "none"
Diagnostic message behavior when an input is out of range, specified as one of the following:
"warning"
— Report the diagnostic message as a warning."error"
— Report the diagnostic message as an error."none"
— Do not report the diagnostic message.
When an input value is out of range, corresponding rules in the fuzzy system can have unexpected firing strengths.
NoRuleFiredMessage
— Diagnostic message behavior when no rules fire
"warning"
(default) | "error"
| "none"
Diagnostic message behavior when no rules fire, specified as one of the following:
"warning"
— Report the diagnostic message as a warning."error"
— Report the diagnostic message as an error."none"
— Do not report the diagnostic message.
When NoRuleFiredMessage
is "warning"
or "none"
and no rules fire for a given output, the
defuzzified output value is set to its mean range value.
EmptyOutputFuzzySetMessage
— Diagnostic message behavior when an output fuzzy set is empty
"warning"
(default) | "error"
| "none"
Diagnostic message behavior when an output fuzzy set is empty, specified as one of the following:
"warning"
— Report the diagnostic message as a warning."error"
— Report the diagnostic message as an error."none"
— Do not report the diagnostic message.
When EmptyOutputFuzzySetMessage
is
"warning"
or "none"
and an output
fuzzy set is empty, the defuzzified value for the corresponding output is
set to its mean range value.
This diagnostic message applies only to Mamdani systems.
Object Functions
evalfis | Evaluate fuzzy inference system |
Examples
Create Option Set for Evaluating FIS
Create option set object, specifying the number of sample points for output fuzzy sets.
options = evalfisOptions('NumSamplePoints',51)
options = EvalFISOptions with properties: NumSamplePoints: 51 OutOfRangeInputValueMessage: "warning" NoRuleFiredMessage: "warning" EmptyOutputFuzzySetMessage: "warning"
Alternatively, create a default option set, and configure properties using dot notation.
options = evalfisOptions; options.NumSamplePoints = 51;
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
When used for code generation, an
evalfisOptions
object stores itsOutOfRangeInputValueMessage
,NoRuleFiredMessage
, andEmptyOutputFuzzySetMessage
properties as character vectors rather than strings.When evaluating a fuzzy inference system in Simulink®, it is recommended to not use
evalfis
orevalfisOptions
within a MATLAB Function block. Instead, evaluate your fuzzy inference system using the Fuzzy Logic Controller block.
Version History
Introduced in R2018aR2018b: C and C++ code generation support
You can generate code for loading and evaluating a fuzzy inference system (FIS) using MATLAB® Coder™. For an example, see Generate Code for Fuzzy System Using MATLAB Coder.
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes 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)