I've got three matrixes, one of which contains the unknowns. Two of them are multiplied by each other and result the last one.
A1 * A2 = A3
So, I've got this code in MATLAB:
syms A1 A2 A3 B C D F
k1=1; k2=2, b=3, a=4
A1 = [ -exp(i*k1*b) exp(-k2*b) exp(k2*b) 0; i*k1*exp(i*k1*b) k2*exp(-k2*b) -k2*exp(k2*b) 0; 0 -exp(-k2*a) -exp(k2*a) (exp(-i*k1*a) + exp(i*k1*a)); 0 -k2*exp(-k2*a) k2*exp(k2*a) i*k1*(exp(-i*k1*a) - exp(i*k1*a)) ]
A2 = [ B; C; D; F ]
A3 = [ exp(-i*k1*b) ; i*k1*exp(-i*k1*b) ; 0 ; 0 ]
I want to solve what's the result of B, C, D and F. I know I've got to use function solve but I got problem with the syntax all the time.
Thanks for your time and reply...
This question has no need for any symbolic mathematics. Your
A1andA3matrices are defined numerically. All you have to do to find the entries inA2is to invoke the inverse operator (\) betweenA1andA3. Specifically, if you are given:to find
A2, you would do:You would find the inverse of
A1and multiply this withA3. You can easily do this in MATLAB by the inverse operator:Therefore, just do this:
A2will computeB,C,DandFfor you. Just refer to the first, second, third and fourth elements ofA2respectively.