Effacer les filtres
Effacer les filtres

How to calculate hourly observation?

1 vue (au cours des 30 derniers jours)
aa
aa le 12 Déc 2020
Commenté : aa le 13 Déc 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.

Réponse acceptée

KSSV
KSSV le 12 Déc 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 commentaire
aa
aa le 13 Déc 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by