Main Content

setTunable

Set specified parameter settings as tunable or nontunable

Description

params = setTunable(params,tunableFlag) sets the parameters specified by params as tunable or nontunable using the flags specified in tunableFlag.

example

Examples

collapse all

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

collapse all

Tunable parameter settings, specified as one of these objects or an array of such objects:

  • VariableSettings

  • RuleSettingsObject

  • MembershipFunctionSettings

  • MembershipFunctionSettingsType2

To obtain these parameter settings, use getTunableSettings.

Parameter tunability for the parameters specified in params, specified as a logical 1 (tunable) or 0 (nontunable).

Version History

Introduced in R2019a