31.10.2014 Views

What Is Fuzzy Logic?

What Is Fuzzy Logic?

What Is Fuzzy Logic?

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

addvar<br />

Purpose<br />

Syntax<br />

Description<br />

Addvariableto<strong>Fuzzy</strong>InferenceSystem<br />

a = addvar(a,'varType','varName',varBounds)<br />

addvar has four arguments in this order:<br />

• The name of a FIS structure in the MATLAB workspace<br />

• A string representing the type ofthevariableyouwanttoadd<br />

('input' or 'output')<br />

• A string representing the name of the variable you want to add<br />

• The vector describing the limiting range values for the variable you<br />

want to add<br />

Indices are applied to variables in the order in which they are added,<br />

so the first input variable added to a system is always known as input<br />

variable number one for that system. Input and output variables are<br />

numbered independently.<br />

Examples<br />

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

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

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

This command returns the following result:<br />

Name = service<br />

NumMFs = 0<br />

MFLabels =<br />

Range = [0 10]<br />

See Also<br />

addmf, addrule, rmmf, rmvar<br />

4-5

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

Saved successfully!

Ooh no, something went wrong!