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.

2 Tutorial<br />

Working from the Command Line<br />

In this section...<br />

“The Tipping Problem from the Command Line” on page 2-72<br />

“System Display Functions” on page 2-75<br />

“Building a System from Scratch” on page 2-78<br />

“FIS Evaluation” on page 2-81<br />

“The FIS Structure” on page 2-81<br />

The Tipping Problem from the Command Line<br />

The tipping problem is one of many <strong>Fuzzy</strong> <strong>Logic</strong> Toolbox examples of fuzzy<br />

inference systems. The FIS is always cast as a MATLAB structure. To load<br />

this system (rather than bothering with creating it from scratch), type<br />

a = readfis('tipper.fis')<br />

This command returns the following result:<br />

a =<br />

name: 'tipper'<br />

type: 'mamdani'<br />

andMethod: 'min'<br />

orMethod: 'max'<br />

defuzzMethod: 'centroid'<br />

impMethod: 'min'<br />

aggMethod: 'max'<br />

input: [1x2 struct]<br />

output: [1x1 struct]<br />

rule: [1x3 struct]<br />

The labels on the left of this listing represent the various components of the<br />

MATLAB structure associated with tipper.fis. You can access the various<br />

components of this structure by typing the component name after typing a.<br />

At the MATLAB command line, type<br />

a.type<br />

2-72

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

Saved successfully!

Ooh no, something went wrong!