interpolation and resampling problems.

5 views (last 30 days)
xinqi
xinqi on 30 Sep 2012
I am trying to analyze the power spectral density for an unevenly sampled time-series (tachogram). Suppose the length of the data is exactly 1 hr. I want to obtain an evenly sampled series with re-sampling frequency of 4 Hz. I am planning the following steps before performing spectrum estimation.
Step 1)cubic spline interpolation, say 0:1/16:3600.
Question 1: is this equivalent to 16 Hz sampling rate?
Step 2)anti-aliasing filter the interpolated data to eliminate the high frequency component.
Question 2: are there any anti-aliasing functions in Matlab?
Step 3)re-sample to 4 Hz
Question 3: which Matlab re-sample function should I use? how to calculate the re-sampling rate?
Question 4: If only use step 1 & 3, can the single function interp1()
do the same work?
many thanks

Answers (2)

Titus Edelhofer
Titus Edelhofer on 30 Sep 2012
Hi Xinqi,
Q1: yes.
Q2: use a low pass filter (doc filter) to remove the high frequency components. If you have the signal processing toolbox, there are lots of examples/help for constructing appropriate filters.
Q3/Q4: again, in signal processing toolbox functions functions for resampling exist. If you have correctly filtered your data, interp1 should be sufficient.
Titus

Matt J
Matt J on 30 Sep 2012
Question 1: is this equivalent to 16 Hz sampling rate?
Only if the original continuous signal was a cubic spline. In general, once a signal has been sampled, you cannot get better sampling of the original continuous signal unless you can reconstruct the continuous signal from its samples in some way.
Question 2: are there any anti-aliasing functions in Matlab?
Many Matlab commands can be used to perform filtering, e.g., FILTER, CONV, FFT, ... However, it doesn't make much sense to try to anti-alias if the data is already sampled.
Question 3: which Matlab re-sample function should I use? how to calculate the re-sampling rate?
If at this stage, you are downsampling from 16 Hz to 4 Hz, wouldn't you just throw samples away?
Question 4: If only use step 1 & 3, can the single function interp1() do the same work?
Yes, but I don't see why step 1 (upsampling to 16 Hz) would be necessary if ultimately you're just going to downsample again right afterward. You can use INTERP1 to obtain regularly spaced 4 Hz samples from the original data directly.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!