setTunable
Set specified parameter settings as tunable or nontunable
Description
sets the paramsOut
= setTunable(paramsIn
,tunableFlag
)paramsIn
parameters as tunable or nontunable using
tunableFlag
. The modified tunable parameter settings are returned in
paramsOut
.
Examples
Specify Tunability of Parameter Settings
Create a fuzzy inference system, and define the tunable parameter settings of inputs, outputs, and rules.
Create a FIS, and obtain its tunable settings.
fis = mamfis("NumInputs",2,"NumOutputs",2); [in,out,rule] = getTunableSettings(fis);
You can specify all the input variables, output variables, or rules as tunable or nontunable. For example, set all the output variable settings as nontunable.
out = setTunable(out,0);
You can set the tunability of individual variables or rules. For example, set the first input variable as nontunable.
in(1) = setTunable(in(1),0);
You can set individual membership functions as nontunable. For example, set the first membership function of input 2 as nontunable.
in(2).MembershipFunctions(1) = setTunable(in(2).MembershipFunctions(1),0);
You can also specify the tunability of a subset of variables or rules. For example, set the first two rules as nontunable.
rule(1:2) = setTunable(rule(1:2),0);
Input Arguments
paramsIn
— Tunable parameter settings
array | VariableSettings
object | RuleSettings
object | MembershipFunctionSettings
object | MembershipFunctionSettingsType2
object
Tunable parameter settings, specified as one of the following:
VariableSettings
object or an array of such objectsRuleSettingsObject
object or an array of such objectsMembershipFunctionSettings
object or an array of such objectsMembershipFunctionSettingsType2
object or an array of such objects
To obtain these parameter settings, use getTunableSettings
.
tunableFlag
— Parameter tunability
true
or 1
| false
or 0
Parameter tunability for the parameters specified in paramsIn
,
specified as a logical 1
(tunable) or 0
(nontunable).
Output Arguments
paramsOut
— Modified tunable parameter settings
VariableSettings
object | RuleSettings
object | MembershipFunctionSettings
object | MembershipFunctionSettingsType2
object | vector
Modified tunable parameter settings, returned as one of the following:
VariableSettings
object or an array of such objectsRuleSettingsObject
object or an array of such objectsMembershipFunctionSettings
object or an array of such objectsMembershipFunctionSettingsType2
object or an array of such objects
paramsOut
is the same as paramsIn
, except
with all tunable parameters set to the value specified in
tunableFlag
.
Version History
Introduced in R2019a
See Also
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.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)