What is the easiest and accurate way in Matlab to find the eigenvalues and eigenvectors of a problem that do have some zero diagonal elements?

2 views (last 30 days)
How to find the eigenvalues and eigenvectors of a problem that have some zero diagonal elements which dont have the usual form of the standard eigenvalue problem?
clc
clear
K=load('Ks.mat').K;
M=load('Ms.mat').M;
%Eig Method
[Qi,D] = eig(K,M);
omega=sort(real(sqrt(real(diag(D)))*(0.7588455916e-5/0.15176911835e-5)));
omega=
2.40257944339103
2.40257944339103
3.70603843883719
4.39253729249290
4.39253729249290
.
.
.
%LV Method
m=2000;
n=800;
M11=M(1:m,1:m);
M12=M(1:m,m+1:m+n);
M21=M(m+1:m+n,1:m);
M22=M(m+1:m+n,m+1:m+n);
K11=K(1:m,1:m);
K12=K(1:m,m+1:m+n);
K21=K(m+1:m+n,1:m);
K22=K(m+1:m+n,m+1:m+n);
Mt=inv(sqrtm(M11));
LV=1000000;
A11=Mt*K11*Mt;
A12 = LV*Mt*K12;
A21 = LV*K21*Mt;
A22 = K22;
AA =[A11, A12;A21, A22];
[Qi, B]=eig((AA));
C=sqrt(diag(B));
D=C*(0.7588455916e-5/0.15176911835e-5);
Omega=sort(real(D))
1.54228989861890
2.33587868130244
2.98460674608965
3.31683033853761
The results obtained from LV method are much close to the results of the problem which are as below:
1.5477
2.2752
2.9762
3.3202
Why eig is unable to give an accurate result??
How I can get these results through eig command or other way you recommend?
  2 Comments
Mehdi
Mehdi on 22 Jan 2022
[Qi,D] = eig(K,M,'qz');
omega=sort(real(sqrt(real(diag(D)))*(0.7588455916e-5/0.15176911835e-5)));
2.40257944339103
2.40257944339103
3.70603843883719
4.39253729249290
4.39253729249290
4.43682500952759
.
.
.
Nothing changed!

Sign in to comment.

Answers (0)

Categories

Find more on Operating on Diagonal Matrices in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!