?? white_noise.asv
字號:
Atten_Coef = 1.8e-6;
fs = 10e6;
fc = 1e6;
i = 1/fs:1/fs:2048/fs;
s = exp(-i/Atten_Coef);
s1 = SignalDelay(s,300,2.0);
s = exp(-1.3*i/Atten_Coef) - exp(-2.2*i/Atten_Coef);
s2 = SignalDelay(s,600,12.0);
s = exp(-i/Atten_Coef).*sin(2*pi*fc*i);
s3 = SignalDelay(s,1000,4.0);
s = (exp(-1.3*i/Atten_Coef) - exp(-2.2*i/Atten_Coef)).*sin(2*pi*fc*i);
s4 = SignalDelay(s,1600,6.0);
write_noise = sqrt(0.6*0.6)*randn(1,length(s));
s = s1 + s2 + s3 + s4 + write_noise;
plot(s);
% s_relation = zeros(1,6);
[c,l] = wavedec(s,1,'db8');
s_temp = detcoef(c,l,1);
thr = std(s_temp);
for i = 1:length(s_temp)
if abs(s_temp(i))<thr
s_temp(i) = 0;
end
end
c1 = [appcoef(c,l,'db8',1),s_temp,s];
s = waverec(c1,l,'db8');
figure(2)
subplot(211)
plot(c)
subplot(212)
plot(c1);
% thr_value = 1.95/sqrt(length(s_temp))
% flag = 1;
% s_temp = s;
% for j = 1:100
% [c,l] = wavedec(s_temp,1,'db8');
% s_temp = detcoef(c,l,1);
% thr_value = 1.95/sqrt(length(s_temp));
% for i = 1:6
% s_relation(i) = self_relation_dection(s_temp,i);
% if abs(s_relation)>thr_value
% flag = 3;
% break;
% else
% continue;
% end
% end
% if flag >2
% j
% break;
% end
% end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -