how to get eigenvalues and plot it

40 ビュー (過去 30 日間)
PetronasAMG
PetronasAMG 2021 年 10 月 4 日
回答済み: J Chen 2021 年 10 月 4 日
say time is varying from 1< t < 10
I also set the element of matrix
a1 = t/1, a2 = t +2 / 3 ,a3 = t/2 ,a4 = t+5
then i set up the matrix
t = 1:0.5:10;
a1 = t./1; a2 = t+2/3; a3 = t./2; a4 = t+5;
A = [0 0 1 0;-a1 -a2 -a4 0;1 1 1 1;-a3 -a2 0 0];
B = eig(A);
%I need to plot real part of eigenvaluse as real eigen vs t plot
plot(real(A),t);
So something is definatly missing in my code here. After building a A matrix, I get an error. How would I be able to get valuse of each eigenvalues from each time interval, also be able to pull out those corresponding eigenvlause and plot it as eigenvaluse vs t?
error:
using vertcat Dimensions of arrays being concatenated are not consistent
not sure what that means. Please help!

採用された回答

J Chen
J Chen 2021 年 10 月 4 日
Use a loop to calculate and store the eigenvalues for each time point. Plot the data outside the loop.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by