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?

조회 수: 7 (최근 30일)
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
Mehdi
Mehdi 2022년 1월 22일
[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!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by