solve 4 equations with some unknowns parameters.
22 views (last 30 days)
Bruno Luong on 3 Nov 2018
Edited: Bruno Luong on 3 Nov 2018
Your problem looks like you find the EM field with 3 layers and 2 interfaces. The coefficients A, B, C, D gives the strength of different field components, they are linearly related because EM is linear. In order to solve with without getting trivial solution
You must for example fix one of them arbitrary, e.g.
A = 1
That left you with 4 linear equations and 3 unknowns. Then in order such system to have solution, you must have the linear system to have dependent equation, meaning determinant of the matrix is 0.
Write it down this probably gives the equation you looks for.
I don't have symbolic tbx to do this kind of calculation to confirm, it would be possible to carry out numerically me think.
More Answers (1)
Florian Augustin on 2 Nov 2018
I think you are using a modern syntax to call 'solve' that was not supported in R2010b. The equivalent call in R2010b would be
syms a A B C D eps1 eps2 eps3 k1 k2 k3;
eqn1 = (C*exp(k1*a))+(D*exp(-k1*a))-(A*exp(-k3*a));
eqn2 = ((-(C*k1)/eps1)*exp(k1*a))+(((D*k1)/eps1)*exp(-k1*a))-(((A*k3)/eps3)*exp(-k3*a));
eqn3 = (C*exp(-k1*a))+(D*exp(k1*a))-(B*exp(-k2*a));
eqn4 = ((-(C*k1)/eps1)*exp(-k1*a))+(((D*k1)/eps1)*exp(k1*a))+(((B*k2)/eps2)*exp(-k2*a));
sol = solve(eqn1, eqn2, eqn3, eqn4, A, B, C, D);
ASol = sol.A
BSol = sol.B
CSol = sol.C
DSol = sol.D
You can access the documentation for your release of MATLAB by typing 'doc solve' in the MATLAB interface.
Hope this helps,