Geoscience Reference
In-Depth Information
conv without using same , the function filter yields an output vector with the
same length as the input vector. Unfortunately, the function filter assumes
that the i lter is causal. h e i lter weights are indexed n , n -1, n -2 and so on,
and therefore no future elements of the input vector, such as x ( n +1), x( n +2)
etc. are needed to compute the output y ( n ). h is is of great importance in
electrical engineering, the classic i eld of MATLAB application, where i lters
are ot en applied in real time. In earth sciences, however, the entire signal is,
in most applications, available at the time of processing the data. h e data
series is i ltered by
y4 = filter(b3,1,x3);
and the phase correction is then carried out using
y4 = y4(1+(m3-1)/2:end-(m3-1)/2,1);
y4(end+1:end+m3-1,1) = zeros(m3-1,1);
which works only for an odd number of i lter weights. h is command simply
shit s the output by (m-1)/3 towards the lower end of the t -axis, and then
i lls the data to the end with zeros. Comparing the ends of both outputs
illustrates the ef ect of this correction, where
y3(1:5,1)
y4(1:5,1)
yields
ans =
0.0225
0.1950
0.2587
-0.1103
-0.5638
ans =
0.0225
0.1950
0.2587
-0.1103
-0.5638
h is was the lower end of the output. We can see that both vectors y3 and y4
contain the same elements. We now explore the upper end of the data vector,
where
y3(end-5:end,1)
y4(end-5:end,1)
Search WWH ::




Custom Search