MATLAB: Wrong matrix multiplication answer

matrix

Hi,
This multiplication gets a wrong answer:
E=[Eopt(1) 0];
coupler=[sqrt(0.9) 1i*sqrt(0.1);1i*sqrt(0.1) sqrt(0.9)];
Eout=coupler*E(1);
The answer:
Eout =
9.4868 + 0.0000i -0.0000 + 3.1623i
-0.0000 + 3.1623i 9.4868 + 0.0000i
I am multiplying a 2×2 with a 2×1 matrix, so the result should be a 2×1 matrix.
Why is that?
Thanks

Best Answer

No, you are multiplying a 2x2 matrix with a scalar, the first element of E.
Did you mean?
Eout = coupler * E;
Related Question