Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- N = 900;
- alfa = (N - 1) / 2;
- wg = 2 * pi * ( 80 / 44100 );
- for n = 0:N-1
- w(n+1) = 0.5 - 0.5 * cos( (2*pi*n) / (N-1) );
- h(n+1) = ( sin(wg * (n - alfa) ) ) / ( pi * (n - alfa) );
- x(n+1) = n;
- end
- suma = 0;
- index = 1;
- for o = 0:0.01:pi
- for n = 0:N-1
- suma = suma + (w(n+1) * h(n+1) * exp(-1j * o * n));
- end
- hx(index) = o;
- hy(index) = suma;
- suma = 0;
- index = index + 1;
- end
- %stem(x,w)
- %figure;
- %stem(x,h);
- figure;
- plot(hx,abs(hy));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement