SHARE
TWEET

reflect.sci

Nachinka May 30th, 2019 (edited) 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear;
  2. epsilon0 = 1/(36*%pi)*10^-9;
  3. mu0 = 4*%pi*10^-7;
  4. epsilon1 = 1;  mu1 = 1; sigma1 = 0;
  5. epsilon2 = 10; mu2 = 1; sigma2 = 0;
  6. epsilon3 = 80; mu3 = 1; sigma3 = 0;
  7. f1 = 300*10^6; f2 = 3*10^9;
  8. omega = 2*%pi*f1;
  9. epsilon1complex = epsilon0*epsilon1*(1-%i*sigma1/(omega*epsilon0*epsilon1));
  10. epsilon2complex = epsilon0*epsilon2*(1-%i*sigma2/(omega*epsilon0*epsilon2));
  11. epsilon3complex = epsilon0*epsilon3*(1-%i*sigma3/(omega*epsilon0*epsilon3));
  12.  
  13. k1=omega*sqrt(mu0*mu1*epsilon1complex);
  14. k2=omega*sqrt(mu0*mu2*epsilon2complex);
  15. k3=omega*sqrt(mu0*mu3*epsilon3complex);
  16. W1=sqrt(mu0*mu1/epsilon1complex);
  17. W2=sqrt(mu0*mu2/epsilon2complex);
  18. W3=sqrt(mu0*mu3/epsilon3complex);
  19.  
  20. phipad = 0:%pi/2/1000:%pi/2-%pi/2/1000;
  21. phipr12 = asin(k1/k2*sin(phipad));
  22. phipr13 = asin(k1/k3*sin(phipad));
  23.  
  24. R12norm = (W2*cos(phipad) - W1*cos(phipr12)) ./ (W2*cos(phipad) + W1*cos(phipr12));
  25. R12paral = (W1*cos(phipad) - W2*cos(phipr12)) ./ (W1*cos(phipad) + W2*cos(phipr12));
  26. R13norm = (W3*cos(phipad) - W1*cos(phipr13)) ./ (W3*cos(phipad) + W1*cos(phipr13));
  27. R13paral = (W1*cos(phipad) - W3*cos(phipr13)) ./ (W1*cos(phipad) + W3*cos(phipr13));
  28. figure(1);
  29. subplot(221);
  30. plot(phipad,abs(R12norm),phipad,abs(R13norm));
  31. subplot(222);
  32. plot(phipad,abs(R12paral),phipad,abs(R13paral))
  33. subplot(223);
  34. plot(phipad,atan(imag(R12norm),real(R12norm)),phipad,atan(imag(R13norm),real(R13norm)));
  35. subplot(224);
  36. plot(phipad,atan(imag(R12paral),real(R12paral)),phipad,atan(imag(R13paral),real(R13paral)));
  37. //figure(1);
  38. //plot(phipad,phipr12,phipad,phipr13,phipad,phipad);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top