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

1 回表示 (過去 30 日間)
Micke Malmström
Micke Malmström 2017 年 11 月 4 日
編集済み: Micke Malmström 2017 年 11 月 4 日
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...]
Data1.data % The voltage measured of a 0.1 Hz triangle function at the times specified above.
and:
Data2.data % 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
Data2.t=interp(Data1.data(start_index_n:stop_index_n),...
Data1.t,...
Data2.data(start_index_n:stop_index_n))
If I'm lucky I can find the
start_index_n
for each period "n" in both Data1.data and Data2.data 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)

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by