multiply by two matrix

3 views (last 30 days)
shiv gaur
shiv gaur on 26 Sep 2021
Answered: Walter Roberson on 27 Sep 2021
Mj = [cos (kj hj) i*sin(kj hj) /kj ; i*kj*sin(kj hj) cos (kj hj) ];
kj=sqrt(nj^2*k02-x^2);
Take
n1=1.521;n2=2.66;k0=1;h1=1.5e-6;h2=1e-6
multiply M1*M2
  4 Comments
Jan
Jan on 26 Sep 2021
Please format your code properly. Use the icons on top of the field for editing in the forum.
You still did not ask a question.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 27 Sep 2021
syms x
n = [1.521, 2.66];
k0 = 1;
h = [1.5e-6, 1e-6];
k = @(j) sqrt(n(j).^2*k0.^2-x.^2);
M = @(j) [
cos(k(j) .* h(j)), i*sin(k(j) .* h(j))/k(j)
i .* k(j) .* sin(k(j).*h(j)), cos(k(j) .* h(j))
]
M = function_handle with value:
@(j)[cos(k(j).*h(j)),i*sin(k(j).*h(j))/k(j);i.*k(j).*sin(k(j).*h(j)),cos(k(j).*h(j))]
M12 = M(1) * M(2)
M12 = 

Tags

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by