Main Content

setTunableValues

Specify tunable parameter values of a fuzzy inference system

Description

fis = setTunableValues(fis,paramset,paramvals) sets the tunable parameter values of fuzzy inference system fis. To specify the parameters to set, use paramset. Specify the new parameter values using paramvals.

example

___ = setTunableValues(___,IgnoreInvalidParameters=ignoreInvalid) sets a flag for ignoring invalid parameters values.

Examples

collapse all

Create a fuzzy inference system and define the tunable parameter settings of inputs, outputs, and rules.

fis = mamfis(Name="fis1",NumInputs=2,NumOutputs=1);
[in,out,rule] = getTunableSettings(fis);

Obtain tunable parameter values of the inputs, outputs, and rules of the fuzzy inference system.

paramVals = getTunableValues(fis,[in;out;rule]);

Redefine some of the values and update the tunable parameter values of the FIS.

paramVals(1:3) = [0 0 1];
fis = setTunableValues(fis,[in;out;rule],paramVals);

Input Arguments

collapse all

Fuzzy inference system, specified as one of these objects:

  • mamfis — Mamdani fuzzy inference system

  • sugfis — Sugeno fuzzy inference system

  • mamfistype2 — Type-2 Mamdani fuzzy inference system

  • sugfistype2 — Type-2 Sugeno fuzzy inference system

  • fistree — Tree of interconnected fuzzy inference systems

Tunable parameter settings, specified as an array of input, output, and rule parameter settings in the input FIS. To obtain these parameter settings, use the getTunableSettings function with the input fis.

paramset can be the input, output, or rule parameter settings, or any combination of these settings.

Tunable parameter values, specified as an array. The order of the values in paramvals matches the order of the parameters in paramset. To obtain the array of parameter values for a FIS, use getTunableValues.

Flag to ignore invalid parameters, specified as either true or false. If true, invalid paramvals are replaced with the existing parameter values of a fuzzy system.

Version History

Introduced in R2019a