Function File: plotmf (fis, in_or_out, var_index)
Function File: plotmf (fis, in_or_out, var_index, y_lower_limit)
Function File: plotmf (fis, in_or_out, var_index, y_lower_limit, y_upper_limit)

Plot the membership functions defined for the specified FIS input or output variable on a single set of axes. Fuzzy output membership functions are represented by the [0, 1]-valued fuzzy functions, and constant output membership functions are represented by unit-valued singleton spikes. Linear output membership functions, however, are represented by two-dimensional lines y = ax + c, regardless of how many dimensions the linear function is defined to have. In effect, all of the other dimensions of the linear function are set to 0.

If both constant and linear membership functions are used for a single FIS output, then two sets of axes are used: one for the constant membership functions, and another for the linear membership functions. To plot both constant and linear membership functions together, or to plot constant membership functions as horizontal lines instead of unit-valued spikes, represent the constant membership functions using ’linear’ functions, with 0 for all except the last parameter, and with the desired constant value as the last parameter.

The types of the arguments are expected to be:

  • fis - an FIS structure
  • in_or_out - either ’input’ or ’output’ (case-insensitive)
  • var_index - an FIS input or output variable index
  • y_lower_limit - a real scalar (default value = -0.1)
  • y_upper_limit - a real scalar (default value = 1.1)

Six examples that use plotmf are:

  • cubic_approx_demo.m
  • heart_disease_demo_1.m
  • heart_disease_demo_2.m
  • investment_portfolio_demo.m
  • linear_tip_demo.m
  • mamdani_tip_demo.m
  • sugeno_tip_demo.m

See also: gensurf.

Package: fuzzy-logic-toolkit