Best way to find your own values?

I have an equation AX= nBX, where Aand Bare matrices of the same order, and X- coefficient matrix. A n- this eigenvalues.

Now I know Xwhich I get by imposing the necessary boundary conditions.

What is the best way to find eigenvalues 'n'and why?

A1=np.dot(A,X)

B1=np.dot(B,X)

n=eigvals(A1,B1)

OR

n,yhat=eig(A,B).
+3
source share
1 answer

Assuming X is unknown, you want

eigenvalues = scipy.linalg.eigvals(A, B)

If you also need your own vectors, you want

eigenvalues, eigenvectors = scipy.linalg.eig(A, B)

It makes no sense to consider this as a problem with an eigenvalue if X is known. If X is known, you can simply multiply and see if AX is a multiple of BX.

+1
source

All Articles