Learn R Programming

FuzzyToolkitUoN (version 1.0)

triMF:

Create a triangular membership function.

Description

Creates a triangular membership function object.

Usage

triMF(mfName, x, mfParams)

Arguments

mfName

String representing the name.

x

The range, should be a numerical vector such as 1:10

mfParams

The input parameters, which should be a 4 number vector representing the left, mean, right and height.

Value

mfName
The name of the membership function (String)
mfX
A numeric vector representing the range of the variable.
mfParams
A numeric vector representing the given input parameters upon creation. These should be the left, mean, right and height.
mfVals
The evaluated values for the membership function.

Details

To access the values:

$mfParams for the stored parameters.

$mfX for the stored range.

$mfName for the stored name.

$mfVals for the stored evaluated values.

Where is the assigned name of the membership function in the environment.

Examples

Run this code
MyMembershipFunction <<- triMF("MyTri", 1:10, c(3,6,8,1))

Run the code above in your browser using DataLab