Learn R Programming

compositions (version 2.0-8)

gsi.svdsolve: Internal function: Solves singular and non square equation systems

Description

Based on the singular value decomposition, a singular equation system ax=b is solved.

Usage

gsi.svdsolve(a,b,...,cond=1E-10)

Value

The "smallest" vector or matrix solving this system with minimal joint error among all vectors.

Arguments

a

the matrix of ax=b (a.k.a. left-hand side matrix)

b

the vector or matrix b of ax=b (a.k.a right-hand side, independent element)

cond

the smallest-acceptable condition of the matrix. Smaller singular values are truncate

...

additional arguments to svd

Author

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

Examples

Run this code
#A <- matrix(c(0,1,0,0,0,0),ncol=2)
#b <- diag(3)
#erg <- gsi.svdsolve(A,b)
#erg
#A %*% erg 
#diag(c(0,1,0))  # richtig

Run the code above in your browser using DataLab