| Contents | Index |
a = addmf(a,'varType',varIndex,'mfName','mfType',mfParams)
A membership function can be added only to a variable in an existing MATLAB workspace FIS. Indices are assigned to membership functions in the order in which they are added, so the first membership function added to a variable is always known as membership function number one for that variable. You cannot add a membership function to input variable number two of a system if only one input has been defined.
The function requires six input arguments in this order:
A MATLAB variable name of a FIS structure in the workspace
A string representing the type of variable you want to add the membership function to ('input' or 'output')
The index of the variable you want to add the membership function to
A string representing the name of the new membership function
A string representing the type of the new membership function
The vector of parameters that specify the membership function
a = newfis('tipper');
a = addvar(a,'input','service',[0 10]);
a = addmf(a,'input',1,'poor','gaussmf',[1.5 0]);
a = addmf(a,'input',1,'good','gaussmf',[1.5 5]);
a = addmf(a,'input',1,'excellent','gaussmf',[1.5 10]);
plotmf(a,'input',1)

addrule | addvar | plotmf | rmmf | rmvar

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |