MATLAB eig(A,B) of a positive semi-definite matrix pair (A,B) gives complex eigenvalues

539 Views Asked by At

A and B both are 151 by 151 psd matrices, I want to solve the generalized eigenvalue proplem

A * v = Lambda * B * v

when using MATLAB function eig()

[V,D] = eig(A,B)

I get complex numbers in both V and D.Why did this happen and is it possible to avoid it?