Eigenvalue and Eigenvector extracting

4 ビュー (過去 30 日間)
PetronasAMG
PetronasAMG 2021 年 10 月 3 日
回答済み: KSSV 2021 年 10 月 3 日
so I have a time array say, 0< t < 10
My elements of matrix are function that will depend on variable t.
Say, a11 = (t^2)/2 ,a12 = (1+t) / 2, a13 = t^2
a21 = 3 a22 = 0 a23 = t^3 -1
a31 = 4, a32= 0, a33 = 0
I am able to set up tha a matrix and apply all time intervals into element of the matrix. I am having touble on how I should use either for loop or an alternative method, to get eigenvalues of each corresponding ts.
A1 = [a11(:,1), a12(:,1)........0] ; [V1, E1]=eig(A1)
A2 = [a11(:,2), a12(:,2)........0]; [V2, E2]=eig(A2)
this may kinda work, but it's is lots of repatition until A10 and I prefer using a loop to get all the specific valuse. Say if I want more points between 0s to 10s, (like 0.1) using t = [1:0.1:10], I won't be able to type each A1 A2 A3...
I want the program to show me that eigenvlaues when t = 1, t =1.1 or t=1.2 when t=2, t=3 .....until t=10. How do I get the matrix to find eigvlaues of each corresponding time? do i have to use a for loop?

採用された回答

KSSV
KSSV 2021 年 10 月 3 日
t = 0:0.5:10 ;
A = @(t) [t^2/2 (1+t)/2 t^2 ; 3 0 t^3-1 ; 4 0 0] ;
nt = length(t) ;
V = zeros(3,3,nt) ;
D = zeros(3,1,nt) ;
for i = 1:nt
[v,d] = eig(A(t(i))) ;
V(:,:,i) = v ;
D(:,1,i) = diag(d) ;
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by