File: svd.inverse.Rd

package info (click to toggle)
r-cran-matrixcalc 1.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: makefile: 2
file content (36 lines) | stat: -rw-r--r-- 959 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
\name{svd.inverse}
\alias{svd.inverse}
\title{ SVD Inverse of a square matrix }
\description{
  This function returns the inverse of a matrix using singular value
  decomposition.  If the matrix is a square matrix, this should be equivalent
  to using the \code{solve} function.  If the matrix is not a square matrix,
  then the result is the Moore-Penrose pseudo inverse.
}
\usage{
svd.inverse(x)
}
\arguments{
  \item{x}{ a numeric matrix }
}
\value{
  A matrix.
}
\references{
  Bellman, R. (1987). \emph{Matrix Analysis}, Second edition, Classics in Applied Mathematics,
  Society for Industrial and Applied Mathematics.
}
\author{ Frederick Novomestky \email{fnovomes@poly.edu} }
\examples{
A <- matrix( c ( 1, 2, 2, 1 ), nrow=2, byrow=TRUE)
invA <- svd.inverse( A )
print( A )
print( invA )
print( A \%*\% invA )
B <- matrix( c( -1, 2, 2 ), nrow=1, byrow=TRUE )
invB <- svd.inverse( B )
print( B )
print( invB )
print( B \%*\% invB )
}
\keyword{ math }