# prepare some fuzzy numbers (first type of the initial sample)
fuzzyValues <- matrix(c(0.25,0.5,1,1.25,0.75,1,1.5,2.2,-1,0,0,2),
ncol = 4,byrow = TRUE)
# calculate the expected value of the first fuzzy number
CalculateExpValue(fuzzyValues[1,])
# calculate the expected value for the whole matrix
CalculateExpValue(fuzzyValues)
# prepare some fuzzy numbers (second type of the initial sample)
fuzzyValuesInc <- matrix(c(0.25,0.5,1,0.25,0.25,1,1.5,0.7,1,0,0,2),
ncol = 4,byrow = TRUE)
# calculate the expected value of the first fuzzy number
CalculateExpValue(fuzzyValuesInc[1,], increases = TRUE)
Run the code above in your browser using DataLab