Beruflich Dokumente
Kultur Dokumente
Membership functions
Command line FIS functions - functions for creating/modifying/exploring
a FLS (fuzzy logic system) from the command line
Advanced techniques
Miscellaneous functions
GUI helper files - additional files used by the GUI editors
In order to visualize the available functions and graphical interfaces in Matlab,
type the following in the command line:
close all % close all open windows
clear all % delete all the variables from the workspace
clc
% clear the command line
help fuzzy
Fuzzy Logic Toolbox
Version 2.2.11 (R2010a) 25-Jan-2010
GUI editors
anfisedit findclusterfuzzy
mfedit
ruleedit
ruleview
surfview
-
Membership functions.
dsigmf
- Difference of two sigmoid membership functions.
gauss2mf
- Two-sided Gaussian curve membership function.
gaussmf
- Gaussian curve membership function.
gbellmf
- Generalized bell curve membership function.
pimf
- Pi-shaped curve membership function.
psigmf
- Product of two sigmoid membership functions.
smf
- S-shaped curve membership function.
sigmf
- Sigmoid curve membership function.
trapmf
- Trapezoidal membership function.
trimf
- Triangular membership function.
zmf
- Z-shaped curve membership function.
Command line
addmf
addrule
addvar
defuzz
evalfis
evalmf
gensurf
FIS functions
- Add membership function to FIS
- Add rule to FIS.
- Add variable to FIS.
- Defuzzify membership function.
- Perform fuzzy inference calculation.
- Generic membership function evaluation.
- Generate FIS output surface.
getfis
mf2mf
newfis
parsrule
plotfis
plotmf
readfis
rmmf
rmvar
setfis
showfis
showrule
writefis
Advanced techniques
anfis
- Training routine for Sugeno-type FIS (MEX only).
fcm
- Find clusters with fuzzy c-means clustering.
genfis1
- Generate FIS matrix using generic method.
genfis2
- Generate FIS matrix using subtractive clustering.
subclust
- Estimate cluster centers with subtractive clustering.
Miscellaneous functions
convertfis - Convert v1.0 fuzzy matrix to v2.0 fuzzy structure.
discfis
- Discretize a fuzzy inference system.
evalmmf
- For multiple membership functions evaluation.
fstrvcat
- Concatenate matrices of varying size.
fuzarith
- Fuzzy arithmatic function.
findrow
- Find the rows of a matrix that match the input string.
genparam
- Generates initial premise parameters for ANFIS learning.
probor
- Probabilistic OR.
sugmax
- Maximum output range for a Sugeno system.
GUI helper files
cmfdlg
- Add customized membership function dialog.
cmthdlg
- Add customized inference method dialog.
fisgui
- Generic GUI handling for the Fuzzy Logic Toolbox
gfmfdlg
- Generate fis using grid partition method dialog.
mfdlg
- Add membership function dialog.
mfdrag
- Drag membership functions using mouse.
popundo
- Pull the last change off the undo stack.
pushundo
- Push the current FIS data onto the undo stack.
savedlg
- Save before closing dialog.
statmsg
- Display messages in a status field.
updtfis
- Update Fuzzy Logic Toolbox GUI tools.
wsdlg
- Open from/save to workspace dialog.
fuzzy is both a directory and a function.
FUZZY Basic FIS editor.
The FIS Editor displays high-level information about a
Fuzzy Inference System. At the top is a diagram of the
system with each input and output clearly labeled. By
double-clicking on the input or output boxes, you can bring
up the Membership Function Editor. Double-clicking on the
fuzzy rule box in the center of the diagram will bring up
Explore the information given by Matlab about working with this function
Exercise 1
Run the example presented in the "trimf" function help. Use "copy and paste" for
the entire sequence. Analyze what happens, line by line.
Remember: you can always use "help [function_name]" to view details about any
function.
Exercise 2
Re - run Exercise 1 for any other function in the "Membership functions" group.
Launching the graphical editor for creating a FLS
Type the following in the command line:
fuzzy
Exercise 3
Import an existing FLS in the graphical editor, namely the FLS for computing the
tip for a meal at the restaurant. Follow these steps:
download the archieve "tip.zip" from the course's web
page:http://www.bel.utcluj.ro/dce/didactic/sln/sln.htm and save its content
(unzipped) into Matlab's current folder.
from the graphical editor, go to "File -> Import -> From file..." and select
"tip.fis".
Explore the options available from the menus.
Functions for creating/modifying/exploring a FLS from the command line
Load "tip.fis" in the workspace variable "tip" using:
close all
clear all
clc
tip = readfis ('tip.fis');
Use the following command to see the properties of the fuzzy system:
getfis(tip)
Name
= tip
Type
= mamdani
NumInputs = 2
InLabels =
service
food
NumOutputs = 1
OutLabels =
tip
NumRules = 3
AndMethod = min
OrMethod = max
ImpMethod = min
AggMethod = max
DefuzzMethod = centroid
ans =
tip
Use the following command to display the control surface generated by the fuzzy
system:
gensurf(tip)
Use "newfis" to create a new fuzzy system. For additional information, type:
help newfis
NEWFIS Create new FIS.
FIS=NEWFIS(FISNAME) creates a new Mamdani-style FIS structure
FIS=NEWFIS(FISNAME, FISTYPE) creates a FIS structure for a Mamdani or
Sugeno-style system with the name FISNAME.
FIS=NEWFIS(FISNAME, FISTYPE, andMethod, orMethod, impMethod, ...
aggMethod, defuzzMethod)
specifies the methods for AND, OR, implication, aggregation, and
defuzzification, respectively.
See Also
readfis, writefis
Kelly Liu 4-5-96
Copyright 1994-2003 The MathWorks, Inc.
$Revision: 1.18.2.2 $ $Date: 2004/04/10 23:15:32 $
Reference page in Help browser
doc newfis
In order to see how a fuzzy system behaves in Simulink, load the model,
"tip_sim.mdl", by typing the following sequence in the command line:
close all
clear all
clc
tip = readfis ('tip.fis');
tip_sim;
Exercise 4
Change the values for "food" and/or "service", and notice how they influence the
value of the tip.
Note: the values for "food" and "service" must be between 0 and 10.
Use the mouse to modify the values for "food" and "service" from the rule viewer
window. The value of the tip will change consequently.
The control surface (graphical representation of the output variable (tip) as a
function of the two input variables (service, food)) generated by the FLS can be
displayed.
To that effect, form the Rule Viewer window use the menu "View - Surface".