View source: R/MatrixToFuzzyNumbers.R
MatrixToFuzzyNumbers | R Documentation |
'MatrixToFuzzyNumbers' converts a matrix into a list of triangular or trapezoidal fuzzy numbers.
MatrixToFuzzyNumbers(fuzzyMatrix, varNames = NA, ...)
fuzzyMatrix |
Name of the matrix with fuzzy numbers. |
varNames |
Optional names for values of the output list. |
... |
Additional parameters passed to other functions. |
The procedure converts the given matrix to a list of triangular or trapezoidal fuzzy numbers. If the input matrix has 3 columns, then they are treated as descriptions of consecutive triangular fuzzy numbers. In the case of 4 columns, we get trapezoidal fuzzy numbers. The values in these columns are equal to the left supports, cores (or left and right ends of the cores for trapezoidal fuzzy numbers) and right supports. Each row is related to single fuzzy number.
The output is given as a list of fuzzy numbers.
FuzzyNumbersToMatrix
for conversion of a list of fuzzy numbers into a matrix.
library(FuzzyNumbers)
# prepare matrix with 2 triangular fuzzy numbers
matrix1 <- matrix(c(1,3,5,2,5,7),ncol=3,byrow = TRUE)
# convert this matrix to list of fuzzy numbers
MatrixToFuzzyNumbers(matrix1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.