Biomedical Engineering Reference
In-Depth Information
the procedure may include using overlapping segments if a larger value for
is needed and
the number of available data points is not sufficient and/or multiplying each section by a
window that forces continuity at the end points of the segments.
L
EXAMPLE PROBLEM 11.27
Consider the sinusoid signal
x ð k Þ¼
sin
ðp=
4
k Þþ n ð k Þ
that is corrupted by random noise,
). Using MATLAB, show that averaging the signal removes
the noise component and reveals the deterministic component. Show results for 1, 10, and 100
averages.
n
(
k
Solution
k
¼
1:64; %Discrete Time Axis
for i
¼
1:100 %Generating 100 signal Trials
x(i,:)
¼
þ
sin(pi/4*k)
randn(1,64); %i-th trial
end
X1
¼
x(1,:); %1 Averages
¼
X10
mean(x(1:10,:)); %10 Averages
¼
X100
mean(x); %100 Averages
subplot(311) %Plotting Results, 1 Average
plot(k,X1,'k')
axis([1 64 -3 3])
title('1 Average')
ylabel('Amplitude')
subplot(312) %Plotting Results, 10 Averages
plot(k,X10,'k')
axis([1 64 -3 3])
title('10 Averages')
ylabel('Amplitude')
subplot(313) %Plotting Results, 100 Averages
plot(k,X100,'k')
axis([1 64 -3 3])
title('100 Averages')
xlabel('Discrete Time')
ylabel('Amplitude')
The results are shown in Figure 11.28.
Search WWH ::




Custom Search