Filter Sensor signal data to a vector of certain length

1 Ansicht (letzte 30 Tage)
I have two temperatur sensors that measure temp t1 and t2 over the period of 24 hours.
I want to perform a simple calculation like ( t1-t2) or something like (t1*t2),
The problem is, one sensor measures temperature every 10 seconds, having 8640 values over 24 hours.
The other sensor measures temperature every 60 seconds, having 1440 values over 24 hours.
How to i perform simple operations on these data sets when each has a different vector length?
(Note: I have tried to simplify the explanation. Actual operation is a bit more complicated, involving multiple variables with different vector length of signals measured over 24 hours)
Thanks alot in advance!!

Akzeptierte Antwort

Star Strider
Star Strider am 25 Apr. 2021
I would use interp1 to interpolate the higher-frequency sensor record to the times of the lower-frequency sensor record.
If the intent is to do any sort of signal processing analysis on the signals, use resample instead of interp1 to do the same operation.
The higher-frequency sensor result should have data either at or very close to the lower-frequency sensor times, so the interpolated data would be reliable.
Do not interpolate the lower-frequency sensor data to the higher-frequency sensor times. That creates data that do not actually exist, and the results of any analysis would then be worthless.

Weitere Antworten (0)

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by