31.10.2014 Views

What Is Fuzzy Logic?

What Is Fuzzy Logic?

What Is Fuzzy Logic?

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

addmf<br />

Purpose<br />

Syntax<br />

Description<br />

Add membership function to <strong>Fuzzy</strong> Inference System<br />

a = addmf(a,'varType',varIndex,'mfName','mfType',mfParams)<br />

Amembershipfunctioncanbeaddedonlytoavariableinanexisting<br />

MATLAB workspace FIS. Indices are assigned to membership functions<br />

in the order in which they are added, so the first membership function<br />

added to a variable is always known as membership function number<br />

one for that variable. You cannot add a membership function to input<br />

variable number two of a system if only one input has been defined.<br />

The function requires six input arguments in this order:<br />

1 A MATLAB variable name of a FIS structure in the workspace<br />

2 A string representing the type of variable you want to add the<br />

membership function to ('input' or 'output')<br />

3 The index of the variable you want to add the membership function to<br />

4 A string representing the name of the new membership function<br />

5 Astringrepresentingthetypeof the new membership function<br />

6 The vector of parameters that specify the membership function<br />

Examples<br />

a = newfis('tipper');<br />

a = addvar(a,'input','service',[0 10]);<br />

a = addmf(a,'input',1,'poor','gaussmf',[1.5 0]);<br />

a = addmf(a,'input',1,'good','gaussmf',[1.5 5]);<br />

a = addmf(a,'input',1,'excellent','gaussmf',[1.5 10]);<br />

plotmf(a,'input',1)<br />

4-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!