Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- samples = 1024;
- omega_min = 20*2*pi;
- bands = 20;
- octaves = 10;
- w_kcq = [];
- for kcq = 0:bands-1
- w_kcq(kcq+1) = 2^(octaves/bands*kcq)*omega_min;
- end
- alpha = 25/46;
- Q = 1/(2^(octaves/bands) - 1);
- N = w_kcq ./ Q;
- hamming_window = [];
- exponential = [];
- temp_kernel = [];
- for kcq = 0:bands-1
- for n = 0:samples-1
- hamming_window(n+1,kcq+1) = (alpha - (1-alpha)*cos(2*pi*(n - (samples/2 - N(kcq+1)/2))/N(kcq+1)));
- exponential(n+1,kcq+1) = exp(-i*w_kcq(kcq+1)*(n-samples/2));
- temp_kernel(n+1,kcq+1) = hamming_window(n+1,kcq+1)*exponential(n+1,kcq+1)*N(kcq+1);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement