Main Content

gensurfOptions

Option set for gensurf function

    Description

    Use a gensurfOptions object to specify options for creating a surface plot using gensurf. You can specify options such as the inputs to plot the output against and the number of grid points to plot.

    Creation

    Description

    opt = gensurfOptions creates a default option set for generating a fuzzy inference system output surface using gensurf. Use dot notation to modify this option set for your specific application. Any options that you do not modify retain their default values.

    example

    opt = gensurfOptions(Name=Value) sets properties using one or more name-value arguments. For example, opt = gensurfOptions(NumGridPoints=30) creates a gensurfOptions object and sets the number of grid points to 30.

    Before R2021a, use commas to separate each name and value, and enclose Name in quotes. For example, opt = gensurfOptions('NumGridPoints',30) creates a gensurfOptions object and sets the number of grid points to 30.

    example

    Properties

    expand all

    Indices of input variables to plot the output against, specified as one of the following:

    • Positive integer less than or equal to the number of inputs — Plot the output against a single input using a 2-D plot.

    • Two-element vector of positive integers — Plot the output against two input variables using a 3-D surface plot.

    When InputIndex is 'auto', gensurf uses the first two input variables by default.

    Index of output variable to plot, specified as a positive integer less than or equal to the number of outputs.

    When OutputIndex is 'auto', gensurf uses the first output variable by default.

    Number of grid points to plot, specified as one of the following:

    • Integer greater than 1 — Specify the number of grid points when using a single input variable, or the same number of grid points for both inputs when using two inputs variables.

    • Two-element vector of integers greater than 1 — Specify a different number of grid points for each input variable.

    If you specify InputIndex as an integer and NumGridPoints as a vector, then gensurf uses the first element of NumGridPoints as the number of grid points for the specified input variable.

    To plot a smoother surface, increase the number of grid points.

    Reference values for input variables not shown in the surface plot, specified as a vector with length equal to the number of FIS inputs. Specify NaN for the inputs specified in InputIndex.

    When ReferenceInputs is 'auto', gensurf uses the midpoint of the range of each unused variable as a reference value.

    Number of sample points to use when evaluating membership functions over the output variable range, specified as an integer greater than 1. For more information on membership function evaluation, see evalfis.

    Note

    NumSamplePoints is not used by Sugeno-type systems.

    Object Functions

    gensurfGenerate fuzzy inference system output surface

    Examples

    collapse all

    Create a default gensurfOptions option set.

    opt = gensurfOptions;

    Specify options using dot notation. For example, for a two-input, three-output fuzzy system, specify options to:

    • Plot the surface for the second output against the values of the first and third inputs.

    • Specify a reference value of 0.25 for the second input variable.

    opt.OutputIndex = 2;
    opt.InputIndex = [1 3];
    opt.ReferenceInputs = [NaN 0.25 NaN];

    Any values you do not specify remain at their default values.

    You can also specify one or more options when creating the option set. For example, create an option set, specifying 25 grid points for both plotted input variables:

    opt2 = gensurfOptions('NumGridPoints',25);

    Version History

    Introduced in R2017a

    expand all

    See Also

    |