Save fuzzy inference system to file
You can save a fuzzy inference system (FIS) in a
writeFIS function. To load the saved file, use the
Do not manually edit the contents of a
.fis file. Doing so can
produce unexpected results when loading the file using
writeFIS( opens a dialog box for saving
a FIS. In this dialog box, specify the name and location of the
Create a fuzzy inference system, and add an input variable with membership functions.
fis = mamfis('Name','tipper'); fis = addInput(fis,[0 10],'Name','service'); fis = addMF(fis,'service','gaussmf',[1.5 0],'Name','poor'); fis = addMF(fis,'service','gaussmf',[1.5 5],'Name','good'); fis = addMF(fis,'service','gaussmf',[1.5 10],'Name','excellent');
Save the fuzzy system in the current working folder in the file
fileName— File name
File name specified as a string or character vector. If you do not specify the
.fis extension in the file name,
Behavior changed in R2018b
writefis is now
writeFIS. To update your code,
change the function name from
writeFIS. The syntaxes are equivalent.
Not recommended starting in R2018b
Support for representing fuzzy inference systems as structures will be removed in a
future release. Use
instead. There are differences between these representations that require updates to your
code. These differences include:
Object property names that differ from the corresponding structure fields.
Objects store text data as strings rather than as character vectors.
Also, all Fuzzy Logic
Toolbox™ functions that accepted or returned fuzzy inference systems as structures now
accept and return either
To convert existing fuzzy inference system structures to objects, use the