matpower {mogsa} | R Documentation |
the power of a matrix
matpower(x, n, nf = min(dim(x)), tol = 1e-07)
x |
a numerical matrix object that the power of which should be calculated |
n |
The matrix to the power of |
nf |
The number of axes kept in the calculation of SVD and reconstruction |
tol |
The tolerance of the axis, singular vectors with singular value lower than tol will be ignored in the reconstruction. |
The power of a matrix is calculated in two steps: decompostion step: x=UDV' and the reconstruction step: x^n=U*D^n*V' In the reconstruction, the singular vectors with a singular value more than tol are kept.
A matrix x^n
Called by the wsvd function.
Chen Meng
See Also wsvd
set.seed(56) m <- matrix(rnorm(15), 5, 3) s <- matpower(m, 2) s <- matpower(m, -2)