Eigenvalue and Eigenvector extracting
조회 수: 1 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!