How to calculate hourly observation?

1 次查看(过去 30 天)
Hi everyone,
May someone help me here ...
I have data in two columns, Hour and Minuts. I have to calculate the hourly number of observation. For example, observation among 17:30 to 18:30 and then 19:30 and so on. It's not fixed something 19:42 to 20:42 and so on for a period of 2 days. I have attached data here.

采纳的回答

KSSV
KSSV 2020-12-12
You can use interp1 to get what you want.
  1. Read the excel file.
  2. To read the exel file use readtable.
  3. Convert your time into date time. Read about datetime.
  4. Create your required hourly time data.
  5. Then use interp1.
  1 个评论
aa
aa 2020-12-13
I have attempted with this but unable to implement. Let me explain you in more detail about what i required.
I have one set of data in YYYY:MM:DD:HH:MM:SS. It is varibale data points per hour and length of the aray is varies from few tens to thousands. While the other data set has only one value (in YYYY:MM:DD:HH:MM:SS). I want to get hourly number of observations in data set one for 48 hours after the time values of second data set. For example, if the value of data set 2 is 2015:02:12:19:30:00, I need to get observation per hour from 2015:02:12:19:30 to 2015:02:14:19:30. Both data set attached here.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by