library(FuzzyNumbers)
# prepare complex fuzzy number
A <- FuzzyNumber(-5, 3, 6, 20, left=function(x)
pbeta(x,0.4,3),
right=function(x) 1-x^(1/4),
lower=function(alpha) qbeta(alpha,0.4,3),
upper=function(alpha) (1-alpha)^4)
# plot the figures
PlotZEP(A,FUN=function(x)x^3+2*x^2-1)
# find and plot the approximated output via the Zadeh's principle
PlotZEP(A,FUN=function(x)x^3+2*x^2-1,approximation=TRUE)
Run the code above in your browser using DataLab