I have PPG (heart-rate) data that was collected using a sampling rate of 100 Hz. Before performing any analyses, I need to re-sample the data to 300 Hz using cubic spline interpolation.
The data are saved in text files in column vector format. The file I am working with now is saved as PPG001 and has been imported into my workspace.
I was able to successfully increase the sampling rate to 300 with the following code:
x = PPG001; p = 3; q = 1; y = resample(x,p,q);
Because linear interpolation is set as the default, how do I add a 'spline' function to ensure that the resample function uses cubic spline interpolation?
I tried this, unsuccessfully:
x = PPG001;t = 1:39811;fs = 100;p = 3q = 1y = resample(x,t,fs,p,q,'spline');
This is the error message I get:
Error using resample Too many input arguments.
Error in Untitled4 (line 7) y = resample(x,t,fs,3,1,'spline');
Thanks, in advance, for your help!
Best Answer