Sum up values of corresponding date time intervals.

2 vues (au cours des 30 derniers jours)
Rahul Kesarkar
Rahul Kesarkar le 7 Avr 2021
I have an excel sheet with the first column as date in dd:mm:yyyy hh:mm format and the second column with data coresponding to each hour.
I want to sum up the data in particular time period which is recuring.
For example i want to sum the coreesponding data between
for weekdays 12:06:2017 20:00 to 13:06:2017 08:00, and repeat the same for 13:06:2017 20:00 to 14:06:2017 08:00 for the next 180 days.
again repeat same for weekends 09:06:2017 20:00 to 12:06:2017 08:00 repeat this for the next 180 days again.
sum up the total values for weekdays and weekends.

Réponses (1)

KSSV
KSSV le 7 Avr 2021
You can find the respective date indices using find or logical indexing. Once you know the first date and last date indices, you can do what you want.
  1 commentaire
Rahul Kesarkar
Rahul Kesarkar le 7 Avr 2021
Thank you for your response.
Can you elobrate. Please.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by