solution of matrix eigen value equation

조회 수: 2 (최근 30일)
shiv gaur
shiv gaur 2022년 2월 8일
답변: Walter Roberson 2022년 2월 8일
n1=1.50;
n2=1.746;
n3=0.55-1i*11.5;
n4=1.444;
t1=5;
t2=1:70;
t3=24;
k0=2*pi/1.55;
k1=k0*sqrt(beta^2-n1^2);
k2=k0*sqrt(beta^2-n2^2);
k3=k0*sqrt(beta^2-n3^2);
k4=k0*sqrt(beta^2-n4^2);
M1=1/2(1+(k1/k2)*exp(-k1*t1) (1-(k1/k2)*exp(k1*t1);(1-(k1/k2)*exp(-k1*t1) (1+(k1/k2)*exp(k1*t1) );
M2=1/2(1+(k2/k3)*exp(-k2*t2) (1-(k2/k3)*exp(k2*t2);(1-(k2/k3)*exp(-k2*t2) (1+(k2/k3)*exp(k2*t2) );
M3=1/2(1+(k3/k4)*exp(-k3*t3) (1-(k3/k4)*exp(k3*t3);(1-(k3/k4)*exp(-k3*t3) (1+(k3/k4)*exp(k3*t3) );
M=M3*M2*M1=[m11 m12; m21 m22]
A=(A1;A2);
B=(B1;B2);
A2=0;
B1=0;
A=M*B;
m22(beta)=0;
from this equation plot(t2 vs beta)
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 2월 8일
What is your question?
shiv gaur
shiv gaur 2022년 2월 8일
find the root of equation by varying t2 from 1:70

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2022년 2월 8일
I had to make a bunch of guesses. In particular your M1 M2 M3 were not coded properly, and I had to guess about where to put the ) . I also had to guess about beta.
Eventually I hit the point where you have an equation relating to the undefined variables m11 m12 m21 m22 and I gave up trying to fix at that point.
You do not define A1, A2, B1, B2 before they are used, and you overwrite some of them after they are used which is confusing. You also overwrite A after you define it, which is again confusing.
There is too much wrong with the code for me to be able to fix it at this time.
n1=1.50;
n2=1.746;
n3=0.55-1i*11.5;
n4=1.444;
t1=5;
%t2=1:70;
syms t2 beta
t3=24;
k0=2*pi/1.55;
k1=k0*sqrt(beta^2-n1^2);
k2=k0*sqrt(beta^2-n2^2);
k3=k0*sqrt(beta^2-n3^2);
k4=k0*sqrt(beta^2-n4^2);
M1 = [1/2*(1+(k1/k2))*exp(-k1*t1), (1-(k1/k2)*exp(k1*t1)); (1-(k1/k2)*exp(-k1*t1)), (1+(k1/k2)*exp(k1*t1)) ]
M1 = 
M2 = [1/2*(1+(k2/k3))*exp(-k2*t2), (1-(k2/k3)*exp(k2*t2)); (1-(k2/k3)*exp(-k2*t2)), (1+(k2/k3)*exp(k2*t2)) ]
M2 = 
M3 = [1/2*(1+(k3/k4))*exp(-k3*t3), (1-(k3/k4)*exp(k3*t3)); (1-(k3/k4)*exp(-k3*t3)), (1+(k3/k4)*exp(k3*t3)) ]
M3 = 
M = M3*M2*M1 == [m11 m12; m21 m22]
Unrecognized function or variable 'm11'.
A = [A1;A2]
B = [B1;B2]
A2 = 0;
B1 = 0;
A = M*B;
eqn = m22*beta == 0

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by