37-Singular value decomposition | R Documentation |
SVD factorization.
## S4 method for signature 'Rcpp_MPCR'
La.svd(x, nu = min(n, p), nv = min(n, p))
## S4 method for signature 'Rcpp_MPCR'
svd(x, nu = min(n, p), nv = min(n, p))
x |
An MPCR matrix. |
nu , nv |
The number of left/right singular vectors to return. |
The factorization is performed by the LAPACK routine gesdd()
.
The SVD decomposition of the MPCR matrix.
library(MPCR)
svd_vals <- c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1)
x <- as.MPCR(svd_vals,9,4,"single")
y <- svd(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.