Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. xp2[xi_] :=
  2. Module[{g, num, den}, g = Sqrt[4*xi^2 + (4*xi^2*(xi^2 - 1))^(2/3)];
  3. num = 2*xi^2*Sqrt[g];
  4. den = Sqrt[8*xi^2*(xi^2 + 1) + 12*g*xi^2 - g^3] - Sqrt[g^3];
  5. num/den];
  6. xz2[xi_] := xi^2/xp2[xi];
  7.  
  8. t[xi_] := Sqrt[1 - 1/xi^2];
  9.  
  10. (*Use particular values for low-order functions*)
  11. r1[xi_, x_] := x;
  12. r2[xi_, x_] := ((t[xi] + 1)*x^2 - 1)/((t[xi] - 1)*x^2 + 1);
  13. r3[xi_, x_] :=
  14. x*((1 - xp2[xi])*(x^2 - xz2[xi]))/((1 - xz2[xi])*(x^2 - xp2[xi]));
  15.  
  16. (*Use nesting property for higher-degree functions*)
  17. r4[xi_, x_] := r2[r2[xi, xi], r2[xi, x]];
  18. r8[xi_, x_] := r4[r2[xi, xi], r2[xi, x]];
  19.  
  20. ellgain[xi_, w_, w0_, ep_] := 1/Sqrt[1 + ep^2*r8[xi, w/w0]^2];
  21.  
  22. DensityPlot[
  23. w0 = 1;
  24. ep = 0.5;
  25. xi = 1.05;
  26. min = 0.0001;
  27. max = 10;
  28.  
  29. Log[Abs[
  30. ellgain[xi, sig + I*w, w0*I, ep]
  31. ]],
  32. {sig, -4, 4},
  33. {w, -4, 4},
  34. PlotRange -> {Log[min], Log[max]},
  35. PlotPoints -> 100,
  36. ColorFunction -> GrayLevel,
  37. ClippingStyle -> {Black, White}
  38. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement