Function File: writefis (fis)
Function File: writefis (fis, filename)
Function File: writefis (fis, filename, dialog)

Save the specified FIS currently in the Octave workspace to a file named by the user. There are three forms of writefis:

# Arguments

Action Taken

1

Open a dialog GUI to help the user choose a directory and name for the output file.

2

Do not open a dialog GUI. Save the FIS to a file in the current directory with the specified filename. If the specified filename does not end in ’.fis’, append ’.fis’ to the filename.

3

Open a dialog GUI with the specified filename in the ’filename’ textbox of the GUI. If the specified filename does not end in ’.fis’, append ’.fis’ to the filename.

The types of the arguments are expected to be:

fis

an FIS structure satisfying is_fis (see private/is_fis.m)

filename

a string; if the string does not already end with the extension ".fis", then ".fis" is added

dialog

the string ’dialog’ (case insensitive)

Note: The GUI dialog requires zenity to be installed on the system.

Known error: When using the file dialog, if the user clicks "Cancel" instead of saving the file, an error message is generated.

See also: readfis.

Package: fuzzy-logic-toolkit