Page 109 - MATLAB Recipes for Earth Sciences
P. 109

102                                               5 Time-Series Analysis

            amplitudes in the interpolated time series, which typically occur as neigh-
            boring extreme minima and maxima. Since all these and other interpolation
            techniques might introduce some artifacts to the data, it is always advisable
            to (1) preserve the number of data points before and after interpolation, (2)
            report the method employed for estimating the equally-spaced data sequence
            and (3) explore the impact of interpolation on the variance of the data.
               After this brief introduction to interpolation techniques, we apply the
            most popular linear and cubic-spline interpolation techniques to unevenly-
            spaced data. Having interpolated the data, we use the spectral tools that have
            already been applied to evenly-spaced data (Chapters 5.3 and 5.4). Firstly,
            we load the two time series:
               series1 = load('series1.txt');
               series2 = load('series2.txt');
            Both synthetic data sets contain a two-column matrix with 339 rows. The
            first column contains ages in kiloyears that are not evenly spaced. The second

            column contains oxygen-isotope values measured on foraminifera. The data
            sets contain 100, 40 and 20 kyr cyclicities and they are overlain by gaussian
            noise. In the 100 kyr frequency band, the second data series is shifted by
            5 kyrs with respect to the first data series. To plot the data we type

               plot(series1(:,1),series1(:,2))
               figure
               plot(series2(:,1),series2(:,2))

            The statistics of the spacing of the first data series can be computed by
               intv1 = diff(series1(:,1));
               plot(intv1)

            The plot shows that the spacing varies around a mean interval of 3 kyrs with
            a standard deviation of ca. 1 kyrs. The minimum and maximum value of the
            time axis

               min(series1(:,1))
               max(series1(:,1))

            of t =0 and t =997 kyrs gives some information of the temporal range of the
               1       2
            data. The second data series
               intv2 = diff(series2(:,1));

               plot(intv2)
   104   105   106   107   108   109   110   111   112   113   114