File Exchange

image thumbnail

Time-domain Sinc Interpolation (Resampling)

version 2.0.0.0 (20.9 KB) by Dr. Erol Kalkan, P.E.
Time-domain SINC resampling (interpolation) function with a simple example

19 Downloads

Updated 22 Oct 2019

View License

A robust interpolation function using a SINC kernel to convolve the original input time series in order to get resampled time series. A simple example is provided in comment section to illustrate how resampleSINC works. See also resampleFDZP for frequency domain zero padding (FDZP) resampling.

Cite As

Dr. Erol Kalkan, P.E. (2019). Time-domain Sinc Interpolation (Resampling) (https://www.mathworks.com/matlabcentral/fileexchange/59027-time-domain-sinc-interpolation-resampling), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Thanks Adam for your note. Say y has a length of 200 and m is 4. Then, with your formulation, u becomes 797. However it should be 800. Also, when I apply your suggested change for u, it creates a shift in the resampled record.

Adam

I would recommend this for the first line to get a more intuitive final sampling:

u = linspace( 1, length(y), ( length(y) - 1 ) * m + 1);

This would mean with e.g. m = 4 you still get samples at the original points, in addition to multiples of 0.25.

I fixed the code to eliminate the delay. I have also included a demo file.

A note to the author:
The resampled signal accumulates a delay. Note that both signals starts at 0,0, and end up with a delay.
Could you explain the source of the delay? Can you think of a way to eliminate it?
Thanks, TF

Works well, great help. Thanks.
A note: the sampling rate dt does not impact performance. I assume that the provided signal is Nyquist sampled.

That's what I was looking for. Thank you, sir!

Updates

2.0.0.0

Bug fixed, which was causing delay in interpolated signal.

1.0.0.0

Title is updated

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux