writeFIS

Save fuzzy inference system to file

You can save a fuzzy inference system (FIS) in a .fis file using the writeFIS function. To load the saved file, use the readfis function.

Note

Do not manually edit the contents of a .fis file. Doing so can produce unexpected results when loading the file using readfis.

Syntax

writeFIS(fis,fileName)
writeFIS(fis)
writeFIS(fis,fileName,"dialog")

Description

example

writeFIS(fis,fileName) saves the fuzzy inference system fis to the current working folder using file name fileName.

writeFIS(fis) opens a dialog box for saving a FIS. In this dialog box, specify the name and location of the .fis file.

writeFIS(fis,fileName,"dialog") opens a dialog box for saving a FIS, setting the name of the file in the dialog box to fileName. In the dialog box, specify the location for the file.

Examples

collapse all

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 myFile.fis.

writeFIS(fis,'myFile');

Input Arguments

collapse all

Fuzzy inference system, specified as one of the following:

  • mamfis object — Mamdani fuzzy inference system

  • sugfis object — Sugeno fuzzy inference system

File name specified as a string or character vector. If you do not specify the .fis extension in the file name, writeFIS adds the extension.

Compatibility Considerations

expand all

Behavior changed in R2018b

Not recommended starting in R2018b

Introduced in R2018b