Learn R Programming

SAFD (version 0.02)

defuzzify: Defuzzification

Description

Given a list XX of polygonal fuzzy numbers the function defuzzifies all elements of the list and returns the vector of Steiner points (as weighting measure the Lebesgue measure on [0,1] is used).

Usage

defuzzify(XX)

Arguments

XX
...should be a list of polygonal fuzzy numbers (the function implicitly checks the conditions)

Value

  • Given input XX in the correct format the function returns vector of Steiner points.

Details

See examples

Examples

Run this code
data(XX)
V<-translator(XX[[3]],50)
V2<-V
V2$x<-V$x/20
SS<-list(length=150)
for (j in 1:150){
 SS[[j]]<-generator(V2,)
 }
a<-defuzzify(SS)

#
X<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0.3,0,1,0,0.3)))
Y<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.3,1,0,0.3)))
Z<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.6,1,1,0)))
FF<-list(Z,X,Y)
a<-defuzzify(FF)

RR<-list(length=1503)
RR[1:3]<-FF
RR[4:1503]<-SS
a<-defuzzify(RR)

RR<-list(length=1501)
RR[1]<-FF[1]
RR[2:1501]<-SS
a<-defuzzify(RR)

Run the code above in your browser using DataLab