# let's define two trapezoidal fuzzy numbers
tpfn1 <- c(1,2,3,4)
tpfn2 <- c(2,6,8,10)
# calculate the distance
MeasureAHD(tpfn1,tpfn2)
# now we use objects from the FuzzyNumbers package
# load the necessary library
library(FuzzyNumbers)
tpfn1 <- TrapezoidalFuzzyNumber(1,2,3,4)
tpfn2 <- TrapezoidalFuzzyNumber(2,6,8,10)
MeasureAHD(tpfn1,tpfn2)
Run the code above in your browser using DataLab