Is it possible to align two data sets with irregular sampling while preserving the respective indices?
Ältere Kommentare anzeigen
I have 2 data sets. These measurements were taken on a test from different instruments at different sampling rates. There is a similarity in a way that when Data A becomes constant, Data B reaches the peak. There are various answers on the community but they have same sampling frequency. In this case the sampling is different and the sampling is not constant either. I want to align them without manually assigning anything. I also want to preserve the indexing of the original data points after alignment.
Currently, my code uses manual picking of points.
clc
clear all
close all
%% Load normalized data
ta = load('ta.mat'); ta = ta.ta;
tu = load('tu.mat'); tu = tu.tu;
xa = load('xa.mat'); xa = xa.xa;
xu = load('xu.mat'); xu = xu.xu;
%% Plotting the data
figure
tiledlayout(1,2)
nexttile
plot (ta,xa)
hold on
plot (tu,xu)
legend('Data A','Data UT', Location='southeast')
tanew = ta + 360.655; % I have identified the difference manually
nexttile
plot (tanew,xa)
hold on
plot (tu,xu)
legend('Data Anew','Data UT', Location='southeast')
I would appreciate your help in this regard.
Good day
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 3 Nov. 2022
0 Stimmen
Point set matching is a difficult problem. I suggest you start here:
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

