Advertisement
Guest User

Untitled

a guest
Sep 9th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. clear all
  2.  
  3. samples = 1024;
  4.  
  5. omega_min = 20*2*pi;
  6. bands = 20;
  7. octaves = 10;
  8. w_kcq = [];
  9. for kcq = 0:bands-1
  10. w_kcq(kcq+1) = 2^(octaves/bands*kcq)*omega_min;
  11. end
  12.  
  13. alpha = 25/46;
  14.  
  15. Q = 1/(2^(octaves/bands) - 1);
  16.  
  17. N = w_kcq ./ Q;
  18.  
  19. hamming_window = [];
  20. exponential = [];
  21. temp_kernel = [];
  22. for kcq = 0:bands-1
  23. for n = 0:samples-1
  24. hamming_window(n+1,kcq+1) = (alpha - (1-alpha)*cos(2*pi*(n - (samples/2 - N(kcq+1)/2))/N(kcq+1)));
  25. exponential(n+1,kcq+1) = exp(-i*w_kcq(kcq+1)*(n-samples/2));
  26. temp_kernel(n+1,kcq+1) = hamming_window(n+1,kcq+1)*exponential(n+1,kcq+1)*N(kcq+1);
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement