MATLAB: Resampling data without altering the frequency of the data

resample

Dear matlab forum,
For my research I have to normalise EMG data for different subjects, so they all have the same amount of samples.
Now, via your forum someone recommend me to use 'interp1' and 'pchip'.
I tested this on a sinusoid with 1000 samples, that runs exactly 1 second.
When I plot this sinusoid, with % reduction in samples, I see that the frequency is affected (see picture).
I'm afraid that this also happens in my EMG data when I resample using this method. Since the end result of the research
is to assess the complexity of EMG signals, I want to preserve as much of the frequency content as possible, but I have to 'resample' to normalise
the amount of samples between subjects, since it is shown that a difference in samples causes different complexity outcomes.
What method could you recommend me to use to resample my data?
Hope to hear,
Jeroen

Best Answer

The problem with the procedure you describe is that the requirements appear to be incompatible. Ideally, all the records will have the same sampling frequency.
I would use the Signal Ptocessing Toolbox resample function to resample them to the same sanpling frequency, then truncate all of them to the length of ths shortest record. Exactly how you do that is your choice.