Description Usage Arguments Details Value Author(s) Examples
The function creates a real-valued, symmetric random matrix of desired dimension. Two alternatives for the probability distribution of the matrix elements are provided.
1 | create.rand.mat(size = 1000, distrib = c("norm", "unif"), mean = 0, stddev = 1)
|
size |
Dimension of the (quadratic) matrix. |
distrib |
Desired probability distribution of the matrix elements. Can be |
mean |
Desired mean of the normal distribution. Only active if |
stddev |
Desired standard deviation of the normal distribution. Only active if |
The function creates a real-valued, symmetrical random matrix of desired dimension. Two alternatives for the probability distribution of the matrix elements are provided: normal and uniform. If distrib = 'norm'
, the mean and the standard deviation can additionally be chosen. If distrib = 'unif'
, the matrix elements will be uniformly distributed in the interval (-1,1).
A list containing the following components:
mean.diag |
The mean of the diagonal elements of the matrix. |
stddev.diag |
The standard deviation of the diagonal elements of the matrix. |
mean.triangle |
The mean of the upper triangle of the matrix (diagonal excluded). |
stddev.triangle |
The standard deviation of the upper triangle of the matrix (diagonal excluded). |
rand.matrix |
The random matrix created. |
Uwe Menzel <uwemenzel@gmail.com>
1 2 3 | set.seed(777)
random.matrix <- create.rand.mat(size = 1000, distrib = "norm")$rand.matrix
dim(random.matrix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.