![]() |
[求助]各位帮小弟看一下这个DSP代码
各位帮小弟看一下这个代码,千万帮俺分析一下是什么东西
万分感谢了 clear all N=1024*16; x1=wavread('Source116'); x1=x1(15000:N+10000-1)';x1=x1./max(abs(x1));%sound(x1,16000) N=length(x1); x2=64*(-1+2*rand(1,N)); L=N-200;%2000; u1=x1+x2;u1=u1(1:L);u2=x1-x2;u2=u2(1:L); u=[u1 u2]; %Shape spectrum like speech r=[.85*exp(j*.01*pi/2) .96*exp(j*.15*pi/2) .98*exp(j*.25*pi/2)]; r=[r conj(r)]; h=poly(r);h=h./sum(h); v=filter(1,h,u); v=v./max(abs(v));%sound(v,16000) %end send signal %Introduce delay d in transmission d=5; v=[zeros(1,d) v]; %sound(v,16000);pause %Unshape received spectrum D=20; %Maximum possible delay for i=1:D w=v(i:end);%filter(h,1,v(d+1:end));%sound(w,16000) %recover parts N1=floor(length(w)/2); w1=w(1:N1); w2=w(N1+1:2*N1); %recover signal z1=w1+w2;%sound(10*z1,16000) %recover noise z2=w1-w2;%sound(z2) e(i)=z1*z1'; end [a b]=min(e); b w=filter(h,1,v(b-1:end));N1=floor(length(w)/2); w1=w(1:N1);w2=w(N1+1:2*N1); %recover signal z1=w1+w2;sound(10*z1,16000) %recover noise z2=w1-w2;%sound(z2) |
所有时间均为北京时间。现在的时间是 10:10。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.