Main Content

readfis

Load fuzzy inference system from file

Description

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

Note

Do not manually edit the contents of a FIS file. Doing so can produce unexpected results when loading the file using a function, such as readfis and getCodeGenerationData, or an app, such as Fuzzy Logic Designer.

example

fis = readfis(fileName) reads a FIS from the file specified by fileName.

fis = readfis opens a dialog box for selecting and reading a FIS file.

Examples

collapse all

Load the fuzzy system stored in the file tipper.fis.

fis = readfis('tipper')
fis = 
  mamfis with properties:

                       Name: "tipper"
                  AndMethod: "min"
                   OrMethod: "max"
          ImplicationMethod: "min"
          AggregationMethod: "max"
      DefuzzificationMethod: "centroid"
    DisableStructuralChecks: 0
                     Inputs: [1x2 fisvar]
                    Outputs: [1x1 fisvar]
                      Rules: [1x3 fisrule]

	See 'getTunableSettings' method for parameter optimization.

Input Arguments

collapse all

File name, specified as a string or character vector either with or without the .fis extension. This file must be in the current working directory or on the MATLAB® path.

Output Arguments

collapse all

Fuzzy inference system, returned as one of the following:

  • mamfis object — Mamdani fuzzy inference system

  • sugfis object — Sugeno fuzzy inference system

  • mamfistype2 object — Type-2 Mamdani fuzzy inference system (since R2019b)

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system (since R2019b)

Version History

Introduced before R2006a

expand all