This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Remove variables from fuzzy inference system


fis = rmvar(fis,varType,varIndex)
[fis,errorStr] = rmvar(fis,varType,varIndex)


fis = rmvar(fis,varType,varIndex) removes the variable varType, of index varIndex, from the fuzzy inference system associated with the workspace FIS structure, fis:

  • SpecifyvarType as either 'input' or 'output'.

  • varIndex is an integer for the index of the variable. This index represents the order in which the variables are listed.

[fis,errorStr] = rmvar(fis,varType,varIndex) returns any error messages to the character vector, errorStr.

This command automatically alters the rule list to keep its size consistent with the current number of variables. You must delete from the FIS any rule that contains a variable you want to remove, before removing it. You cannot remove a fuzzy variable currently in use in the rule list.


collapse all

Create fuzzy inference system.

fis = newfis('mysys');

Add an input variable with a single membership function to the system.

fis = addvar(fis,'input','temperature',[0 100]);
fis = addmf(fis,'input',1,'cold','trimf',[0 30 60]);

View the variable properties.

ans = 

  struct with fields:

      Name: 'temperature'
    NumMFs: 1
       mf1: 'cold'
     range: [0 100]

Remove the membership function. To do so, remove membership function 1 from input 1.

fis = rmmf(fis,'input',1,'mf',1);

View the variable properties.

ans = 

  struct with fields:

      Name: 'temperature'
    NumMFs: 0
     range: [0 100]

The variable now has no membership function.

See Also

| | |

Introduced before R2006a

Was this topic helpful?