Fuzzy Logic Toolbox | ![]() ![]() |
Add a membership function to an FIS.
Synopsis
a = addmf(a,'varType',varIndex,'mfName','mfType',mfParams)
Description
A membership function can only be added 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 will always be 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:
'input'
or 'output'
)Example
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)![]()
See Also
addrule
, addvar
, plotmf
, rmmf
, rmvar
![]() | Alphabetical List of Functions | addrule | ![]() |