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.

2 Tutorial<br />

In the toolbox, the AND implication methods perform an element by element<br />

matrix operation, similar to the MATLAB function min(x,y).<br />

a=[1 2; 3 4];<br />

b=[2 2; 2 2];<br />

min(a,b)<br />

ans =<br />

1 2<br />

2 2<br />

The OR implication methods perform an element by element matrix operation,<br />

similar to the MATLAB function max(x,y).<br />

Guidelines for Creating Custom Implication Functions<br />

The custom implication functions must operate in the same way as<br />

the MATLAB functions max, min, orprod and must be of the form y =<br />

custom_imp(w,outputmf).<br />

Here w is an nr-by-ns matrix and contains the weight of each rule. nr is the<br />

number of rules, and ns is the number of parameters used to define the<br />

output membership functions. w(:,j) = w(:,1) for all j, andw(i,1) is the firing<br />

strength of the i th rule.<br />

outputmf is an nr-by-ns matrix and contains the data for each output<br />

membership function, where the i th row is the data for the i th output<br />

membership function.<br />

The following is an example of a custom implication function:<br />

function impfun = custom_imp(w,outputmf)<br />

impfun = min(w,outputmf);<br />

Guidelines for Creating Custom Aggregation Functions<br />

The custom aggregation functions must operate in the same way as<br />

the MATLAB functions max, min, orprod and must be of the form y =<br />

custom_agg(x).<br />

x is an nv-by-nr matrix, which is the list of truncated output functions<br />

returned by the implication method for each rule. nv is the number of output<br />

2-68

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

Saved successfully!

Ooh no, something went wrong!