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.
Dr. Erol Kalkan, P.E. (2021). Time-domain Sinc Interpolation (Resampling) (https://www.mathworks.com/matlabcentral/fileexchange/59027-time-domain-sinc-interpolation-resampling), MATLAB Central File Exchange. Retrieved .
Thanks Jonas, I will add it.
The matlab function 'sinc', which you are using for this resampling function, requires the Signal processing toolbox or the Symbolic math toolbox. Please add that to the requirements.
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.
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?
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!
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!