Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = [0:127];
- x = (3*sin((n*pi)/8)+3).*(heaviside(n) - heaviside(n - 63));
- z = (7*cos((n*pi)/16).*cos(n*pi)).*(heaviside(n) - heaviside(n - 63));
- w = z + x;
- h = 0.5*sinc(0.5*(n-31)).*(heaviside(n) - heaviside(n - 63));
- y = conv(w, h, 'same');
- xk = fft(x);
- zk = fft(z);
- wk = fft(w, 128);
- hk = fft(h, 128);
- yk = wk.*hk;
- ynn = ifft(yk);
- p = (0:length(wk)-1)*128/length(wk);
- q = (0:length(zk)-1)*128/length(zk);
- r = (0:length(hk)-1)*128/length(hk);
- f = (0:length(xk)-1)*128/length(xk);
- s = (0:length(yk)-1)*128/length(yk);
- figure 1
- plot(n, ynn)
- %figure 1
- %plot(r, abs(hk));
- %title('magnitude');
- %figure 2
- %plot(r, angle(hk));
- %title('phase');
- %figure 3
- %plot(r, hk);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement