How to synchronize two datasets with different AND varying sampling rate?

15 views (last 30 days)
I have the data sets, Data1 and Data2 like below:
Data1.t % vector with timestamps e.g. [0.1, 0.4 2 2.3 4 4.5 4.7 etc...] % The voltage measured of a 0.1 Hz triangle function at the times specified above.
and: % the same 0.1 Hz triangle function but measured at different times than in Data1.t
The problem is that I want to figure out the time at which Data2 was sampled, i.e. Data2.t (there is at least 10 samples per period)
I was thinking of using something like
If I'm lucky I can find the
for each period "n" in both and with some peakfinder-function… and then cycle through all the recorded periods.
(I started writing this as a question but as I was writing I realised how I could approach the problem. So this post is mainly to help others)

Answers (0)


Find more on Shifting and Sorting Matrices in Help Center and File Exchange



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by