Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

flipGSVD

Flip output of GSVD


Description

Flip (reverse order) output of GSVD

Usage

flipGSVD(vs, d1 = c(50, 50), d2 = c(48, 50))

Arguments

vs

list output of GSVD

d1

dimensionals of A

d2

dimensions of B

Details

This flipping of the matrix is done to agree with the Matlab code.

Value

Same as GSVD, but order of eigenvectors is reversed.

U

m by m orthogonal matrix

V

p by p orthogonal matrix, p=rank(B)

X

n by n nonsingular matrix

C

singular values, m by n matrix with diagonal elements shifted from main diagonal

S

singular values, p by n diagonal matrix

Note

The GSVD routines are from LAPACK.

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

GSVD

Examples

set.seed(12)

n <- 5
A <- matrix(runif(n*n),nrow=n)
B <- matrix(runif(n*n),nrow=n)

VS = GSVD(A, B)

FVS = flipGSVD(VS, d1 = dim(A) , d2 = dim(B) )
## see that order of eigen vectors is reversed
diag(VS$S)
diag(FVS$S)

PEIP

Geophysical Inverse Theory and Optimization

v2.2-3
GPL (>= 2)
Authors
Jonathan M. Lees [aut, cre]
Initial release
2020-08-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.