Generating baseline wandering noise
조회 수: 4 (최근 30일)
이전 댓글 표시
How to generate baseline wandering noise in matlab code?
댓글 수: 0
채택된 답변
Star Strider
2014년 4월 30일
Here is one way:
t = linspace(0,10*pi,1000);
s = sin(t);
sn = 0.3*cos(t./4);
figure(1)
subplot(2,1,1)
plot(t, s)
title('Signal with constant baseline')
grid
subplot(2,1,2)
plot(t, s+sn)
title('Signal with with wandering baseline')
grid
댓글 수: 2
Star Strider
2014년 5월 1일
Change this line to produce a 20-element vector:
t = linspace(0,10*pi,20)';
sn = 0.5*cos(t./3)*(max(A)-min(A));
figure(1)
plot(A,'-b')
hold on
plot(A+sn,'-r')
hold off
The sn assignment generates the baseline noise, so all you need to do to generate your code with a wandering baseline is to add your signal to it. This code should work for your signal. Only you know what you need, so feel free to change it as necessary.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!