Filter Sensor signal data to a vector of certain length

조회 수: 1 (최근 30일)
Sheikh Mohammad Hussain
Sheikh Mohammad Hussain 2021년 4월 25일
댓글: Star Strider 2021년 4월 25일
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!!

채택된 답변

Star Strider
Star Strider 2021년 4월 25일
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.
  댓글 수: 2
Sheikh Mohammad Hussain
Sheikh Mohammad Hussain 2021년 4월 25일
Im going to try this out right now. You're a lifesaver!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by