Advertisement
ArBa

tits_soi

Dec 2nd, 2018
804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.96 KB | None | 0 0
  1. clear all;
  2. clc;
  3. nr_group=1;
  4. f_gc=200+nr_group*50;
  5. f_p=900+nr_group*100;
  6.  
  7.  
  8. delta_f=50; %Hz lub 25Hz
  9. delta_f_25=25;
  10. N=f_p/delta_f;
  11. N_25=f_p/delta_f_25;
  12.  
  13. H=[exp(-j*(0:4)*pi*((N-1)/N)) zeros(1,11) exp(j*(N-(16:19))*pi*((N-1)/N))];
  14. H_25=[exp(-j*(0:8)*pi*((N_25-1)/N_25)) zeros(1,23) exp(j*(N_25-(32:39))*pi*((N_25-1)/N_25))];
  15.  
  16.  
  17. h=ifft(H);
  18. h_25=ifft(H_25);
  19.  
  20. figure()
  21. stem(0:N-1,h)
  22. print -depsc matalab_wsp_okna_filtru.eps
  23.  
  24. figure()
  25. stem(0:N_25-1,h_25)
  26. print -depsc matalab_wsp_okna_filtru_25.eps
  27.  
  28.  
  29. L=[h];
  30. M=1;
  31. [K,F]=freqz(L,M,512,f_p);
  32. figure()
  33. plot(F,abs(K));
  34. print -depsc matlab_freq.eps
  35.  
  36. L_25=[h_25];
  37. M_25=1;
  38. [K_25,F_25]=freqz(L_25,M_25,512,f_p);
  39. figure()
  40. plot(F_25,abs(K_25));
  41. print -depsc matlab_freq_25.eps
  42.  
  43. figure()
  44. P=angle(K)*180/pi;
  45. plot(F, P)
  46. print -depsc matlab_angle.eps
  47.  
  48. figure()
  49. P_25=angle(K_25)*180/pi;
  50. plot(F_25, P_25)
  51. print -depsc matlab_angle_25.eps
  52.  
  53.  
  54. func=ss(L,M);
  55. [Y, T, F]=step(func,N+5)
  56. stem(T,Y)
  57. hold on
  58. plot(T,Y);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement