singular matrix
Jose E. Roman
jroman at dsic.upv.es
Thu Apr 16 11:04:03 CDT 2009
On 16/04/2009, Yixun Liu wrote:
> Hi,
> For Ax=b, A is mxn, m>n. I use CG to resolve it and find the solution
> makes no sense. I guess rank(A) < min(m,n). How to resolve this
> singular system? Use SVD?
>
> Best,
>
> Yixun
Although it is probably not the most efficient way, you can use SLEPc
to compute an SVD-based approximation of the pseudo-inverse, A+, then
pre-multiply vector b. The following sequence should do the task.
1) Compute p<n singular triplets with SLEPc's SVD solver.
2) VecMDot of b with the left singular vectors.
3) Scale the resulting values with the reciprocals of singular values.
4) VecMAXPY of right singular vectors using the coefficients obtained
in 3)
Jose
More information about the petsc-users
mailing list