Geoscience Reference
In-Depth Information
It can be shown that the values of the impulse response h are identical to the
i lter weights in nonrecursive i lters, but not in recursive i lters. h e above
convolution equation is ot en written in a short form:
In many examples convolution in the time domain is replaced by a simple
multiplication of the Fourier transforms H ( f ) and X ( f ) in the frequency
domain.
h e output signal y ( t ) in the time domain is then obtained by a reverse Fourier
transform of Y ( f ). Signals are ot en convolved in the frequency domain rather
than the time domain because of the relative simplicity of the multiplication.
However, the Fourier transformation itself introduces a number of artifacts
and distortions, and convolution in the frequency domain is therefore not
without problems. In the following examples we apply the convolution only
in the time domain.
First, we generate a unit impulse:
clear
t = (0:20)';
x6 = [zeros(10,1);1;zeros(10,1)];
stem(t,x6), axis([0 20 -4 4])
h e function stem plots the data sequence x6 as stems from the x -axis,
terminated with circles for the data value. h is can be a better way to plot
digital data than using the continuous lines generated by plot . We now
feed this into the i lter and explore the output y6 . h e impulse response is
identical to the weights of nonrecursive i lters.
b6 = [1 1 1 1 1]/5;
m6 = length(b6);
y6 = filter(b6,1,x6);
We again correct this for the phase shit of the function filter , although this
might not be important in this example.
y6 = y6(1+(m6-1)/2:end-(m6-1)/2,1);
y6(end+1:end+m6-1,1) = zeros(m6-1,1);
Search WWH ::




Custom Search