Learn R Programming

FuzzyToolkitUoN (version 1.0)

addMF: Insert a membership function.

Description

Adds a membership function to a variable of a FIS object.

Usage

addMF(FIS, varType, varIndex, mf)

Arguments

FIS
A FIS structure is to be provided.
varType
Should be either 'input' or 'output', which relates to the type of variable (stored on the existing FIS structure) that the membership function will be added to.
varIndex
Should be an integer value representing the index value of the input or output variable that the membership function will be added to (base 1).
mf
The membership function to be stored in the specified location on the given FIS structure.

Value

    Examples

    Run this code
    MF <<- gaussMF("myMF", 0:10, c(1.5,5,1))
    FIS <<- newFIS("MyFIS")
    FIS <<- addVar(FIS, "input", "variableName", 0:10)
    FIS <<- addMF(FIS, "input", 1, MF)

    Run the code above in your browser using DataLab