Transforms a matrix of membership degrees into a logical matrix based on a specified threshold.

degree2logical(x, t = min(apply(x, 1, max)))

Arguments

x

A matrix of membership degrees.

t

Threshold value for converting the degrees to logical values. By default, it uses the minimum of the maximum values in each row.

Value

A logical matrix where each element is `TRUE` if it meets or exceeds the threshold, and `FALSE` otherwise.

Examples

degrees <- matrix(runif(9), nrow = 3)
degree2logical(degrees, t = 0.5)
#>       [,1]  [,2]  [,3]
#> [1,] FALSE FALSE FALSE
#> [2,]  TRUE  TRUE  TRUE
#> [3,]  TRUE  TRUE  TRUE