You are on page 1of 4

Generate Fuzzy Inference System output surface - MATLAB gensurf http://www.mathworks.com/help/fuzzy/gensurf.

html

gensurf
Generate Fuzzy Inference System output surface

Syntax
gensurf(fis)
gensurf(fis,inputs,output)
gensurf(fis,inputs,output,grids)
gensurf(fis,inputs,output,grids,refInput)
gensurf(fis,inputs,output,grids,refinput,points)
[x,y,z] = gensurf( ___ )

Description
gensurf(fis) generates a plot of the output surface of a given fuzzy inference system (fis) using the first two inputs
and the first output.

gensurf(fis,inputs,output) generates a plot using the inputs (one or two) and output (only one is allowed) given,
respectively, by the vector, inputs, and the scalar, output.

gensurf(fis,inputs,output,grids) allows you to specify the number of grids in the X (first, horizontal) and Y
(second, vertical) directions. If grids is a two element vector, you can set the grids in the X and Y directions
independently.

gensurf(fis,inputs,output,grids,refInput) allows you to specify a reference input, and can be used if there are
more than two outputs. The length of the vector refInput is the same as the number of inputs:

Enter NaNs for the entries of refinput corresponding to the inputs whose surface is being displayed.
Enter real double scalars to fix the values of other inputs.

gensurf(fis,inputs,output,grids,refinput,points) allows you to specify the number of sample points on which


to evaluate the membership functions in the input or output range. If points is not specified, a default value of 101 is
used.

[x,y,z] = gensurf( ___ ) returns the variables that define the output surface and suppresses automatic plotting for
any of the previous syntaxes.

Examples collapse all

Generate FIS Output Surface

Load a fuzzy inference system and plot the output surface. Open This Example

a = readfis('tipper');
gensurf(a)

1 of 4 5/13/2016 3:43
Generate Fuzzy Inference System output surface - MATLAB gensurf http://www.mathworks.com/help/fuzzy/gensurf.html

Generate FIS Output Surface for Second Output

Load a fuzzy inference system with two inputs and two outputs. Open This Example

a = readfis('mam22.fis');

Plot the surface for the second output.

gensurf(a,[1 2],2)

2 of 4 5/13/2016 3:43
Generate Fuzzy Inference System output surface - MATLAB gensurf http://www.mathworks.com/help/fuzzy/gensurf.html

Specify Reference Inputs for Surface Plot

Load a fuzzy inference system with four inputs and one output. Open This Example

a = readfis('slbb.fis');

Plot the output surface from the second and third inputs to the output. Fix the first input at -0.5 and the fourth input
at 0.1.

gensurf(a,[2 3],1,[20 20],[-0.5 NaN NaN 0.1])

3 of 4 5/13/2016 3:43
Generate Fuzzy Inference System output surface - MATLAB gensurf http://www.mathworks.com/help/fuzzy/gensurf.html

See Also
evalfis | surfview

4 of 4 5/13/2016 3:43

You might also like