How can I plot a graph for only one eigen value against a variable? I'm only getting one M!
이전 댓글 표시
I am trying to plot a graph for k:[0,1] against the larger eigenvalue from the corresponding matrix. i.e for each value of k I am only interested in the larger of the two eigenvalues from the 2x2 matrix M.
This is a very basic code, I know, but having played around with it for a few days now I could really use some help!
% code
A=3.3;
B=0.45;
a=B;
b=((A+sqrt(A^2-4*B^2))/(2*B))^2;
c=-2*B;
d=-1-b;
D=500;
for k=0.0:0.01:1.0
M=[a-k^2 b; c d-D*k^2];
lam=eig(M);
end
plot(k,lam)
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!