fisvar

Fuzzy variable

Description

Use fisvar objects to represent the input and output variables in a fuzzy inference system (FIS). For more information on creating fuzzy inference systems, see mamfis and sugfis.

Creation

Syntax

var = fisvar
var = fisvar(range)
var = fisvar('Name',name)
var = fisvar(range,'Name',name)

Description

example

var = fisvar creates a fuzzy variable with a default name, default range, and no membership functions. To change the variable properties, use dot notation.

example

var = fisvar(range) sets the Range property.

example

var = fisvar('Name',name) sets the Name property.

var = fisvar(range,'Name',name) sets both the Range and Name properties.

Properties

expand all

Variable name, specified as a string or character vector.

Variable range, specified as a two-element element vector where the first element is less than the second element. The first element specifies the lower bound of the range, and the second element specifies the upper bound of the range.

Membership functions, specified as a vector of fismf objects. To add membership functions to a fuzzy variable:

  • Use the addMF function.

  • Create a vector of fismf objects, and assign it to MembershipFunctions.

You can modify the properties of the membership functions using dot notation.

Object Functions

addMFAdd membership function to fuzzy variable
removeMFRemove membership function from fuzzy variable

Examples

collapse all

Create a fuzzy variable with default properties.

var = fisvar;

To modify the properties of a fisvar object, use dot notation. For example, specify the range of the fuzzy variable to be from -5 to 5.

var.Range = [-5 5];

Create a fuzzy variable with an input range from -10 to 10.

var = fisvar([-10 10]);

Create a fuzzy variable with the name "speed".

var = fisvar("Name","speed");

Introduced in R2018b