How to calculate hourly observation?

1 回表示 (過去 30 日間)
aa
aa 2020 年 12 月 12 日
コメント済み: aa 2020 年 12 月 13 日
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 Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by