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.

showrule<br />

Purpose<br />

Syntax<br />

Description<br />

Examples<br />

Display <strong>Fuzzy</strong> Inference System rules<br />

showrule(fis)<br />

showrule(fis,indexList)<br />

showrule(fis,indexList,format)<br />

showrule(fis,indexList,format,Lang)<br />

This command is used to display the rules associated with a given<br />

system. It can be invoked with one to four arguments. The first<br />

argument, fis, is required. This argument is the MATLAB workspace<br />

variable name for a FIS structure. The second (optional) argument<br />

indexList is the vector of rules you want to display. The third<br />

argument (optional) is the string representing the format in which<br />

therulesarereturned. showrule can return the rule in any of three<br />

different formats: 'verbose' (the default mode, for which English is<br />

the default language), 'symbolic', and'indexed', formembership<br />

function index referencing.<br />

When used with four arguments, the forth argument must be verbose,<br />

and showrule(fis,indexList,format,Lang) displays the rules in the<br />

language given by lang, whichmustbeeither'english', 'francais',<br />

or 'deutsch'.<br />

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

showrule(a,1)<br />

ans =<br />

1. If (service is poor) or (food is rancid)<br />

then (tip is cheap) (1)<br />

showrule(a,2)<br />

ans =<br />

2. If (service is good) then (tip is average) (1)<br />

showrule(a,[3 1],'symbolic')<br />

ans =<br />

3. (service==excellent) | (food==delicious) =><br />

(tip=generous) (1)<br />

4-77

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

Saved successfully!

Ooh no, something went wrong!