power_function | R Documentation |
Power of a matrix computed by successive matrix multiplication.
power_function(A, n)
A |
A matrix |
n |
Positive integer |
This function return the power of a matrix by repeating matrix multiplication.
Alejandro Espinosa-Rada
Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications. Cambridge University Press.
A <- matrix(c(
1, 0, 0, 0,
1, 1, 0, 0,
1, 0, 1, 0,
0, 1, 1, 1
), byrow = TRUE, ncol = 4, nrow = 4)
power_function(A, 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.