Generate Fuzzy Inference System output surface


[x,y,z] = gensurf(___)


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.


collapse all

Generate FIS Output Surface

Load a fuzzy inference system and plot the output surface.

a = readfis('tipper');

Generate FIS Output Surface for Second Output

Load a fuzzy inference system with two inputs and two outputs.

a = readfis('mam22.fis');

Plot the surface for the second output.

gensurf(a,[1 2],2)

Specify Reference Inputs for Surface Plot

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

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])

See Also


Was this topic helpful?