How to calculate hourly observation?

3 visualizzazioni (ultimi 30 giorni)
aa
aa il 12 Dic 2020
Commentato: aa il 13 Dic 2020
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.

Risposta accettata

KSSV
KSSV il 12 Dic 2020
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 Commento
aa
aa il 13 Dic 2020
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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by