SHARE
TWEET

Untitled

a guest Nov 15th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear variables
  2. syms omega
  3. thetas = [
  4.     pi/6;
  5.     pi/4;
  6.     pi/2;
  7.     2*pi/3;
  8.     5*pi/6
  9. ];
  10.  
  11. Zin = exp(1j*omega);
  12. for iter = 1:length(thetas)
  13.     BZ = 1/(1 - 2*cos(thetas(iter))*(Zin^(-1)) + (Zin^(-2)));
  14.     dBZ = diff(BZ);
  15.     Zval = solve(dBZ == 0, omega);
  16.     Zcalc = exp(1j*Zval);
  17.     BZOut(iter) = double(1/(1 - 2*cos(thetas(iter))*(Zcalc^(-1)) + (Zcalc^(-2))));
  18. end
RAW Paste Data
Top