[R] generalized eigenvalues - porting code using eig() from Matlab to R

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Sep 13 20:37:56 CEST 2004


On Mon, 13 Sep 2004, Gavin Simpson wrote:

> I am porting some Matlab routines to R. I am looking for the equivalent 
> function in R for the Matlab function eig(), such that eig(A, B) 
> <quote>produces a diagonal matrix D of generalized eigenvalues and a 
> full matrix V whose columns are the corresponding eigenvectors so that 
> A*V = B*V*D</quote>[1].

So they are eigenvalues/vectors of B^{-1}A provided B is invertible, as in
your example.

> More specifically, I want to find the eigenvalues and eigenvectors of 
> eig(ZKZt, diag(K1)) where:

...

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list