已知h(n)=[0.035226292,-0.085441274,-0.13501102001039,0.459877502,0.806891509,0.332670553];
f=0:0.001:0.5;%此处f为归一化的频率,步长随便设置
w=2*pi*f;N=length(h(n));
n=1:N;
for i=1:length(f)
wkn=exp(-j*w*(n-1));
Hjw(i)=sum(h(n).*wkn);
end
plot(f*fs,20*log10(abs(Hjw))))