Electronics For You

HAMMING.M

-

X(k)=x(k)+(w(n)*exp(-1j*w*(n-1))); end M(k)=abs(x(k)); A(k)=angle(x(k)); k=k+1; end M=20*log10(m); w=-pi:0.01:pi n=0:n-1; figure(1); stem(n,w); grid on; title(‘filter’); xlabel(‘samples >’); ylabel(‘amplitude >’); figure(2) plot(w,m); grid on; title(‘magnitude ‘); xlabel(‘samples >’) ; ylabel(‘amplitude >’) ; figure(3) plot(w,a); grid on; title(‘angle’); xlabel(‘samples >’) ; ylabel(‘amplitude >’) ; %Output. %Enter the length of filter = 31

Newspapers in English

Newspapers from India