Plotting eigen values for different i values in a matrix
4 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix, where i can compute eigen values. I want to have a graph that shows the change in eigen values when it is altered between 0 and 1 , i have tried to do this using a for loop but when i run the code, only the first set eigen values are plotted. Any advice on how i can alter this?
a=1;
b=1.2;
%equilibrium values
%c1 equilbrium value
c1=1;
c2=(a*c1/b);
c3=(a*c1/b)^2;
c4=(a*c1/b)^3;
for i=0:1
D=[-50*a-b+15*a*c3+20*a*c4+12*a*c2-4*i*a*c2,15*a*c2+b+18*a*c3-60*a+24*a*c4,20*a*c2-80*a+24*a*c3+32*a*c4-b*i]
E=[10*a-a*c3-4*a*c4-4*a*c2,-a*c2-b+6*a*c3-10*a+4*a*c4,4*a*c3+b-4*a*c2]
F=[-2*a*c3+2*i*a*c2,-6*a*c3+10*a-4*a*c4,-4*a*c3-b-b*i]
A=[D;E;F]
G=(eig(A))
plot(G)
end
0 件のコメント
回答 (1 件)
Christine Tobler
2018 年 8 月 23 日
After calling plot, use hold on so that the first plot doesn't get overwritten when calling plot a second time.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!