Main Content


Specify tunable parameter values of a fuzzy inference system



fisOut = setTunableValues(fisIn,paramset,paramvals) sets the tunable parameter values of fuzzy inference system fisIn and returns the resulting fuzzy system in fisOut. To specify the parameters to set, use paramset. Specify the new parameter values using paramvals.

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


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 a mamfis, sugfis, mamfistype2, sugfistype2, or fistree object.

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.

Output Arguments

collapse all

Modified fuzzy inference system, returned as a mamfis, sugfis, mamfistype2, or sugfistype2, or fistree object.

fisOut is the same as fisIn except that the parameters specified by paramset have the values specified by paramvals.

Version History

Introduced in R2019a