Option set for gensurf
function
creates
an option set with options specified by one or more opt
= gensurfOptions(Name,Value
)Name,Value
pair
arguments.
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);
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
'InputIndex',[2 3]
plots the output against the second and third
input variables using a 3-D surface plot.'InputIndex'
— Indices of input variables'auto'
(default) | positive integer less than or equal to the number of inputs | two-element vector of positive integersIndices of input variables to plot the output against, specified
as the comma-separated pair consisting of 'InputIndex'
and
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.
'OutputIndex'
— Index of output variable'auto'
(default) | positive integer less than or equal to the number of outputsIndex of output variable to plot, specified as the comma-separated
pair consisting of 'OutputIndex'
and a positive
integer less than or equal to the number of outputs.
When OutputIndex
is 'auto'
, gensurf
uses
the first output variable by default.
'NumGridPoints'
— Number of grid points to plot15
(default) | integer greater than 1
| two-element vector of integers greater than 1
Number of grid points to plot, specified as the comma-separated
pair consisting of 'NumGridPoints'
and 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.
'ReferenceInputs'
— Reference values for input variables'auto'
(default) | vectorReference values for input variables not shown in the surface
plot, specified as the comma-separated pair consisting of 'ReferenceInputs'
and
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.
'NumSamplePoints'
— Number of sample points101
(default) | integer greater than
1
Number of sample points to use when evaluating membership functions over the output variable
range, specified as the comma-separated pair
consisting of 'NumSamplePoints'
and an integer greater than 1
.
For more information on membership function
evaluation, see evalfis
.
Note
NumSamplePoints
is not
used by Sugeno-type systems.
opt
— Option set for gensurf
commandgensurfOptions
option setOption set for gensurf
command, returned
as a gensurfOptions
option set.
You have a modified version of this example. Do you want to open this example with your edits?