support: Support of LR fuzzy number In Calculator.LR.FNs: Calculator for LR Fuzzy Numbers

Description

To determining the support of a LR fuzzy number one can use from this function. In other words, the support function is able to compute the smallest and biggest values x for which μ(x)>0.

Usage

 1 support(M, Left.fun = NULL, Right.fun = NULL)

Arguments

 M A LR, RL or L fuzzy number Left.fun The left-shape function which usually defined before using LRFN.plot (see examples in bellow) Right.fun The right-shape function which usually defined before using LRFN.plot (see examples in bellow)

Value

The "support" function return a interval-valued vector in which the membership function value of LR fuzzy number is bigger than zero.

Abbas Parchami

Examples

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 Left.fun = function(x) { (1-x)*(x>=0)} Right.fun = function(x) { (exp(-x))*(x>=0)} T = LR(1, 0.6, 0.2) support(T) LRFN.plot( T, xlim=c(-5,20), lwd=2, lty=3, col=4) N = RL(3, 0.5, 2) support(N) Left.fun = function(x) { (1-x)*(x>=0)} M = L(2,4,3) support(M) Left.fun = function(x) { (1-x^2)*(x>=0)} Right.fun = function(x) { (exp(-x))*(x>=0)} support( LR(17,5,3)) ## The function is currently defined as function (M, Left.fun = NULL, Right.fun = NULL) { range1 = M - M - M - 100 range2 = M + M + M + 100 x = seq(range1, range2, len = 2e+05) if (M == 0) { y = Left.fun((M - x)/M) * (x <= M) + Right.fun((x - M)/M) * (M < x) } else if (M == 1) { y = Right.fun((M - x)/M) * (x <= M) + Left.fun((x - M)/M) * (M < x) } else if (M == 0.5) { y = Left.fun((M - x)/M) * (x <= M) + Left.fun((x - M)/M) * (M < x) } supp = c() supp = min(x[0 < y & y < 1]) supp = max(x[0 < y & y < 1]) if (supp == min(x)) { supp = -Inf } if (supp == max(x)) { supp = +Inf } return(supp) }

Example output Attaching package: 'Calculator.LR.FNs'

The following object is masked from 'package:base':

sign

 0.400741      Inf
     -Inf 4.999272
 -1.999145  4.999760
 12.00012      Inf
function (M, Left.fun = NULL, Right.fun = NULL)
{
range1 = M - M - M - 100
range2 = M + M + M + 100
x = seq(range1, range2, len = 2e+05)
if (M == 0) {
y = Left.fun((M - x)/M) * (x <= M) + Right.fun((x -
M)/M) * (M < x)
}
else if (M == 1) {
y = Right.fun((M - x)/M) * (x <= M) + Left.fun((x -
M)/M) * (M < x)
}
else if (M == 0.5) {
y = Left.fun((M - x)/M) * (x <= M) + Left.fun((x -
M)/M) * (M < x)
}
supp = c()
supp = min(x[0 < y & y < 1])
supp = max(x[0 < y & y < 1])
if (supp == min(x)) {
supp = -Inf
}
if (supp == max(x)) {
supp = +Inf
}
return(supp)
}

Calculator.LR.FNs documentation built on May 2, 2019, 8:25 a.m.