>> y=[0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1];
>> stem(0:19,y)
H=[zeros(1,1) exp((-j)*pi*(1:3)*((N-1)/N)) zeros(1,13) exp((j)*pi*(N-(17:19))*((N-1)/N))];
>> stem(0:19,(H))
>> h=ifft(H)
stem(0:19,h)
[O,P]=freqz(h,1,512,1000);
plot(P,abs(O))
Wygładzanie okna
H=[zeros(1,1) exp((-i)*pi*(1:3)*((N-1)/N)) zeros(1,13) exp((j)*pi*(N-(17:19))*((N-1)/N))];
>> h=ifft(H);
>> A=[h];
>> A=h.*blackman(20)'
M=[1];
>> [D E]=freqz(A,M,512,1000)
plot(E,abs(D))