I am trying to solve this problem on MATLAB of which code i have shared. It involves solving eigen values of a symbolic matrix with one variable 'f' and then using those values further in calculation. It is taking whole day what should i do?
1 view (last 30 days)
Show older comments
syms f
l=0.1008;
T=0.005;
Dh=0.01;
D1=0.04;
D2=0.16;
x=20*(T*pi*Dh^2/4)/(0.1008*pi*D1^2/4);
c_0=619;
k=2*pi*f/c_0;
t=(0.006+1i*k*(T+0.75*Dh))/x;
Ka=(k^2)-((1i*4*k)/(D1*t));
Kb=(k^2)-((1i*4*k*D1)/((D2^2-D1^2)*t));
Delta=[-1 0 0 0; 0 -1 0 0; 0 0 Ka^2 Ka^2-k^2; 0 0 Kb^2-k^2 Kb^2]
g=eig(Delta);
ee=vpa(g,3)
C1=[1 1 1 1];
C2=[-((g(1,1)^2+Ka^2)/(Ka^2-k^2)) -((g(2,1)^2+Ka^2)/(Ka^2-k^2)) -((g(3,1)^2+Ka^2)/(Ka^2-k^2)) -((g(4,1)^2+Ka^2)/(Ka^2-k^2))];
C3=[1/g(1,1) 1/g(2,1) 1/g(3,1) 1/g(4,1)];
C4=[C2(1,1)/g(1,1) C2(1,2)/g(2,1) C2(1,3)/g(3,1) C2(1,4)/g(4,1)];
A1=[C3(1,1)*exp(g(1,1)*l) C3(1,2)*exp(g(2,1)*l) C3(1,3)*exp(g(3,1)*l) C3(1,4)*exp(g(4,1)*l)];
A2=[C4(1,1)*exp(g(1,1)*l) C4(1,2)*exp(g(2,1)*l) C4(1,3)*exp(g(3,1)*l) C4(1,4)*exp(g(4,1)*l)];
A3=[-exp(g(1,1)*l)/(i*k) -exp(g(2,1)*l)/(i*k) -exp(g(3,1)*l)/(i*k) -exp(g(4,1)*l)/(i*k)];
A4=[-(exp(g(1,1)*l)*C2(1,1))/(i*k) -(exp(g(1,1)*l)*C2(1,2))/(i*k) -(exp(g(1,1)*l)*C2(1,3))/(i*k) -(exp(g(1,1)*l)*C2(1,4))/(i*k)];
E1=[C3(1,1) C3(1,2) C3(1,3) C3(1,4)];
E2=[C4(1,1) C4(1,2) C4(1,3) C4(1,4)];
E3=[1/(i*k) 1/(i*k) 1/(i*k) 1/(i*k)];
E4=[-C2(1,1)/(i*k) -C2(1,2)/(i*k) -C2(1,3)/(i*k) -C2(1,4)/(i*k)]
A=[A1; A2; A3; A4]
I=eye(4);
invA=A\I;
E=[E1; E2; E3; E4];
PP=E*invA;
vpa(PP,3)
9 Comments
David Goodmanson
on 16 Feb 2020
Hi Abhishek
could you post the entire set of equations for this problem, including the definition of D? It appears that D could be d/dz, since after doing the mattix multiplication delta*y, D would be operating on the components of y.
Answers (1)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!