Can I average a retime?

3 次查看(过去 30 天)
ZH
ZH 2020-7-15
评论: ZH 2020-7-17
I have data that is measured every second for 60 minutes.
My current code is
newtimetable3 = retime(TT3,'regular','nearest','TimeStep',seconds(60))
This code retimes the data to every minute which is nice, but I am trying to retime the data to where it averages within the minute for 20 minutes.
Alll in all, I need help making the code averge the times within the 60 seconds and marks that number per minute.
  3 个评论
Mohammad Sami
Mohammad Sami 2020-7-16
Use minutes(20) instead for 20 minutes.
ZH
ZH 2020-7-17
Thank you. I made a few alterations and was able to get it going.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2020-7-16
TT3_20 = TT3(1:60*20);
newtimetable3_20 = retime(TT3_20, 'regular', 'minutely', 'TimeStep', 1);

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by