Can anyone help me on implementing gaussian noise on an ecg signal? If you want i can share my code. The problem is gaussian noise is 0 always.
4 ビュー (過去 30 日間)
古いコメントを表示
sig = 1/abs(Fs) for i = 1:L gauss(i) = exp(-(i*i)/(2*sig*sig))/(sig*sqrt(pi*2)); dist(i) = gauss(i)+ x(i); i end
subplot(2,1,2); plot(t(1:L),dist(1:L)) title('Dist ECG Signal')
0 件のコメント
回答 (2 件)
Chunru
2021 年 7 月 11 日
Fs = 1; L = 128;
x = zeros(L, 1); % This can be your original signal
sig = 1/abs(Fs); % std of Gaussian random noise
%{
for i = 1:L
% This is Gassian pdf function, not Gaussian distributed time series
gauss(i) = exp(-(i*i)/(2*sig*sig))/(sig*sqrt(pi*2));
dist(i) = gauss(i)+ x(i);
end
%}
y = x + randn(L,1) * sig; % signal + Gaussian noise (doc randn)
plot((1:L), y)
title('ECG Signal with Gaussian Noise added')
0 件のコメント
LO
2021 年 7 月 11 日
I tried to fit some params,
you can use the function wgn (white gaussian noise, see documentation)
Fs = 20000;
sig = 1/abs(Fs) ;
L = 100;
x= rand(1,1000);
t=[1:1000];
for i = 1:L
gauss(i) = exp(-(i*i)/(2*sig*sig))/(sig*sqrt(pi*2));
dist(i) = gauss(i)+ x(i);
i
end
noise = wgn(1000,1,0);
subplot(2,1,1);
plot(t(1:L),noise(1:L))
title('white gaussian noise ECG Signal')
subplot(2,1,2);
plot(t(1:L),dist(1:L))
title('Dist ECG Signal')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で ECG / EKG についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!