matpower {mogsa} | R Documentation

## compute the power of a matrix

### Description

the power of a matrix

### Usage

    matpower(x, n, nf = min(dim(x)), tol = 1e-07)

### Arguments

`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.

### Details

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.

### Value

A matrix x^n

### Note

Called by the wsvd function.

### Author(s)

Chen Meng

### See Also

See Also `wsvd`

### Examples

      set.seed(56)
      m <- matrix(rnorm(15), 5, 3)
      s <- matpower(m, 2)
      s <- matpower(m, -2)

[Package mogsa version 1.14.0 Index]