0

Th`anks in advance. I'm plotting a figure in Matlab but I'm facing difficulty, my code is:

clear
clc
n2=1.45:1.5;
x=0:100;k2z=6.28.*n2./x;a=0.01;u1=1;u2=1;k1z=6.28./x; 
for j=1:numel(k1z)
  for i=1:numel(k2z)
        M12=1./2*[1+((u2./u1)*(k1z(j))./(k2z(i))),1-((u2./u1)*(k1z(j))./(k2z(i))) ; 1-((u2./u1)*(k1z(j))./(k2z(i))),1+((u2./u1)*(k1z(j))./(k2z(i)))];
Ms=det(M12);

  end
end
plot(x,Ms)

I'm expecting an array of Ms and its plot vs x.

0 Answers0