addmf: Insert a membership function.

Description Usage Arguments Value Examples

View source: R/FuzzyInferenceSystem.R

Description

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

Usage

1
addmf(fis, varType, varIndex, mfName, mfType, mfParams)

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

mfName

Membership function name to be declared, for example (Poor,Good)

mfType

Membership function type to be declared, for example (trimf, trapmf)

mfParams

The value of membership function.

Value

A fis structure with the new membership function added.

Examples

1
2
3
fis <- newfis('tipper')
fis <- addvar(fis, 'input', 'service', c(0, 10))
fis <- addmf(fis, 'input', 1, 'poor', 'gaussmf', c(1.5, 0))

Example output



FuzzyR documentation built on May 19, 2021, 9:06 a.m.

Related to addmf in FuzzyR...