MATLAB: Downsampling strain measurement data to save memory space

big datadata analysisdownsamplingefficiencyfilterfilteringinterpolationMATLAB

I currently have a few hundred gigabytes of strain measurement data, which has been stored in .mat files. Each of the files includes around a hundred million datapoints. The measurement data has been collected at a sampling rate of 60 Hz. As my area of interest lies in the 10 Hz frequency range, I would be interested in downsamping the data to 20 Hz efficiently and effectively to save some limited memory space. I have noticed that people have used functions such as
%for example
original = 1:102;
%%




downsampled1 = interp1(1:(length(original)), original, linspace(1,(length(original)), (length(original)/3)))
%%
downsampled2 = downsample(original,3)
%%
downsampled3 = resample(original, 1 ,3)
%%
downsampled4 = spline(original,original,linspace(1,(length(original)), (length(original)/3)))
%%
downsampled5 = decimate(original,3)
, but I am at a loss when it comes to understanding the downsides of each of them.
What would be a good and efficient solution for downsampling such big data? Would it be wiser to design my own lowpass filter to simulate what resampling and decimate function essentially do?
I would be grateful for any advice or lines of code for tackling the matter.
Thanks

Best Answer

Out of these five, downsample is probably the fastest because it just drops elements without any filtering or interpolation. If you apply it to your dataset to convert from 60Hz to 20Hz, it will merely keep every third element, so depending on your signal has a low frequency, this might be most appropriate.
Apart from that, resample is preferable because it resamples the signal because it applies filtering and interpolation simultaneously. It also provides the option to selection interpolation method, which them better than interp1 and spline for signal processing since those functions are only designed for interpolation.
decimate also apply to filter, but it only allows integer factor for downsampling. I guess it should be comparable to resample in terms of filtering performance.