Advertisement
Ostu

Untitled

Mar 18th, 2021
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.70 KB | None | 0 0
  1. s=tf('s')
  2. wfal=1;
  3. for n=2:10
  4. e=sqrt(10^(wfal/10)-1);
  5. u=(1/n)*asinh(1/e) ;
  6. omc=1/(cosh(1/n*acosh(sqrt((2*e^2+1)/e^2))));
  7. if mod(n,2)==0
  8.     zwieksz=1;
  9.     for k=1:(n/2)  
  10.     alp=((2*k-1)/(2*n))*pi;
  11.     B=1/(cosh(u)^2-cos(alp)^2);
  12.     A=2*B*sinh(u)*cos(alp);
  13.     a=A/omc;
  14.     b=B/(omc.^2);
  15.     L=1;
  16.     M=[b a 1]
  17.     h=tf(L,M)
  18.     zwieksz=zwieksz*h
  19.     end
  20.     H(n)=zwieksz
  21. else
  22.     zwieksz=1;
  23.     for k=2:((n+1)/2)
  24.         bet=((k-1)/n)*pi;
  25.         B=1/(cosh(u)^2-cos(bet)^2)
  26.         A=2*B*sinh(u)*cos(bet)
  27.         a=A/omc
  28.         b=B/(omc.^2)
  29.         L=1;
  30.         M=[b a 1]
  31.         h=tf(L,M)
  32.         zwieksz=zwieksz*h
  33.     end
  34.     H(n)=zwieksz*(1/((1/sinh(u))*(s+1)))
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement