Description Usage Arguments Note Examples
Generate a transition matrix (square matrix whose rows sum 1), given its dimension and a probability of non-connection.
1 | mat_gen(n, p)
|
n |
The dimension (nrow = ncol) of the matrix to be created |
p |
The probability that one generic element of the matrix will be set to 0. |
Entering a probability of non-connection overcomes the problem that, when generating a continuosly and uniformly distributed sequence, the probability to obtain 0 is 0.
1 | mat_gen(4,0.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.