|
function y=FiltFuncl(x,windowsNum,samp1eNum)
varout=ones (sampleNum, 1)*100000000;
for i=l:(samp1eNum-windowsNum+1 )
a=x(i:i+windowsNum-1)
m=mean(a);
vartmp=std(x(i:i+windowsNum-1));
for j=i:i+windowsNum-1
if(varout(j)>vartmp)
end
end
end
end
len=200;
flen=10; snr=1;
a=zeros (1, len);
for t =1:len
if t<100
a(t)=0;
else
a(t)=2;
end
end
z=awgn (a, snr,' measured'); t=1:1:60;
c=FiltFuncl (z, flen,len); figure;
plot (a,' r');
figure;
plot (z,' g');
figure;
plot (c,' b');
顺便帮忙看看这个程序有啥问题么,一个边沿滤波器的程序 |
|