Main Content


Open Surface Viewer


Use the Surface Viewer to view the output surface for your fuzzy system. To view the output surface, you must specify the input and output variables of your FIS, their corresponding membership functions, and the fuzzy rules for your system.

The Fuzzy Logic Designer app consists of several interactive interfaces for creating a fuzzy inference system (FIS), including the Surface Viewer. For more information on interactively creating fuzzy systems, see Build Fuzzy Systems Using Fuzzy Logic Designer.


surfview(fis) opens the Surface Viewer and loads the fuzzy inference system fis.

surfview(fileName) opens the Surface Viewer and loads a fuzzy inference system from the file specified by fileName.


collapse all

Load or create a fuzzy inference system object. For this example, load the fuzzy system from a file.

fis = readfis('tipper');

Open the Surface Viewer for this fuzzy system.


Figure Surface Viewer: tipper contains an axes object and other objects of type uimenu, uicontrol. The axes object contains an object of type surface.

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

  • mamfistype2 object — Type-2 Mamdani fuzzy inference system

  • sugfistype2 object — Type-2 Sugeno fuzzy inference system


The Surface Viewer is the only interface of the Fuzzy Logic Designer app that supports type-2 fuzzy inference systems.

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


  • For systems with more than two input variables, you can view the output surface for any combination of two inputs. You must specify constant reference values for any other input signals using the Ref. Input value.

  • By default, the surface plot updates automatically when you change the input or output variable selections or the number of grid points. To disable automatic plot updates, in the Options menu, clear the Always evaluate option. When this option is disabled, to update the plot, click Evaluate.

  • To create a smoother plot, increase the Plot points value.

  • To view the surface from different angles, click and drag on the plot area.

Compatibility Considerations

expand all

Warns starting in R2019b

Introduced before R2006a