How do I compare two data sets of unequal length?
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have two sets of data, taken on different days, from the same sensor. The temperature was swept from 26C to -30C to 80C and back to 26C. The sensor was read periodically during the temperature sweep. The data sets consist of a temperature column, and another column representing the sensor readings. I would like to take a difference between the two sets of sensor readings, generating another data set having a column of temperatures, and a column of differences between the two original sets of sensor readings. If each data set had exactly the same vector of temperatures, I could just subtract one vector of sensor readings from the other. However, the temperature vectors do not contain exactly the same temperatures, and they don't even have the same number of elements. I would like to interpolate one set of temperatures and sensor readings to match the temperatures of the other, so I have two data sets of the same size, at the same temperatures. One complicating factor is that, due to sensor hysteresis with respect to temperature, the sensor readings are different on the downward temperature ramps from those on the upward temperature ramp. Therefore I can't sort the data on temperature, because that would mix the upward and downward ramps. If I could sort the data on temperature, I could use timeseries objects, with temperature in place of time. However, that won't work in this case.
8 Commenti
Risposta accettata
Più risposte (2)
Yuvaraj Venkataswamy
il 8 Ago 2018
if true
id = ismember(dataset1', dataset2', 'rows');
X = 1:size(dataset1, 2);
Y = X(id);
end
1 Commento
Vedere anche
Categorie
Scopri di più su Geodesy and Mapping in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!