Main Content

readfis

Load fuzzy inference system from file

Description

fis = readfis(fileName) loads a fuzzy inference system (FIS) from the file specified by fileName. You can load a fuzzy system from either a FIS file (*.fis) or a MAT file (*.mat).

example

fis = readfis opens a dialog box for selecting and loading a FIS or MAT 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. You can load fuzzy systems from the following file types.

  • FIS file (*.fis) — Load a mamfis, sugfis, mamfistype2, or sugfistype2 object.

  • MAT file (*.mat) — Load a mamfis, sugfis, mamfistype2, sugfistype2, or fistree object. The MAT file must contain only one fuzzy system. (since R2024b)

The file must be in the current working folder 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

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system

  • fistree object — FIS tree (since R2024b)

Tips

  • 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.

Version History

Introduced before R2006a

expand all