defuzz: Defuzzify a set of values.

Description Usage Arguments Value Author(s) Examples

View source: R/FuzzyToolkitUoN.R

Description

Defuzzifies a given set of values using a specified range and defuzzification type producing a crisp value.

Usage

1
defuzz(x, vals, type)

Arguments

x

The range to be applied in the function (numeric vector).

vals

The values to be applied in the function (numeric vector).

type

The defuzzification method type, which should be either 'centroid', 'bisector', 'mom', 'som' or 'lom'.

Value

Returns a defuzzified crisp value (double).

Author(s)

Craig Knott, Luke Hovell, Nathan Karimian

Examples

1
defuzz(1:10,c(1.5, 5, 1),"centroid")

Example output

Loading required package: splines
[1] 16.8
Warning message:
In vals * x :
  longer object length is not a multiple of shorter object length

FuzzyToolkitUoN documentation built on May 29, 2017, 6:40 p.m.