| Fuzzy Logic Toolbox | ![]() |
Get fuzzy system properties
getfis(a) getfis(a,'fisprop') getfis(a, 'vartype', varindex)getfis(a,'vartype',varindex,'varprop')getfis(a,'vartype',varindex,'mf',mfindex) getfis(a,'vartype',varindex,'mf',mfindex,'mfprop')
This is the fundamental access function for the FIS structure. With this one function you can learn about every part of the fuzzy inference system.
The arguments for getfis are as follows:
a: the name of a workspace variable FIS structure.
'fisprop': a string indicating the field you want to access, for example, 'Name' or 'NumInputs'.
'vartype': a string indicating the type of variable you want (inputor output).
varindex: an integer indicating the index of the variable you want (1, for input 1, for example).
'varprop': a string indicating the variable property you want, such as name, range, nummfs, and mflabels. See the examples for sample string names.
'mf': a required string that indicates you are searching for membership function information.
mfindex: the index of the membership function for which you are seeking information.
'mfprop': a string indicating values for membership function properties, such as name, type, and params.
You can also access fuzzy system properties directly using MATLAB syntax for structures (including dot notation). See the examples that follow.
One input argument (output is the empty set)
a = readfis('tipper');
getfis(a)
Name = tipper
Type = mamdani
NumInputs = 2
InLabels =
service
food
NumOutputs = 1
OutLabels =
tip
NumRules = 3
AndMethod = min
OrMethod = max
ImpMethod = min
AggMethod = max
DefuzzMethod = centroid
Two input arguments
getfis(a,'type') ans = mamdani
or,
a.type ans = mamdani
Three input arguments (output is the empty set)
getfis(a,'input',1)
Name = service
NumMFs = 3
MFLabels =
poor
good
excellent
Range = [0 10]
or,
a.input(1)
ans =
name: 'service'
range: [0 10]
mf: [1x3 struct]
Four input arguments
getfis(a,'input',1,'name') ans = service
or,
a.input(1).name ans = service
Five input arguments
getfis(a,'input',1,'mf',2)
Name = good
Type = gaussmf
Params =
1.5000 5.0000
or,
a.input(1).mf(2)
ans =
name: 'good'
type: 'gaussmf'
params: [1.5000 5]
Six input arguments
getfis(a,'input',1,'mf',2,'name') ans = good
or,
a.input(1).mf(2).name ans = good
| gensurf | mam2sug | ![]() |
© 1994-2005 The MathWorks, Inc.