Sum up values of corresponding date time intervals.

2 ビュー (過去 30 日間)
Rahul Kesarkar
Rahul Kesarkar 2021 年 4 月 7 日
コメント済み: Rahul Kesarkar 2021 年 4 月 7 日
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.

回答 (1 件)

KSSV
KSSV 2021 年 4 月 7 日
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 件のコメント
Rahul Kesarkar
Rahul Kesarkar 2021 年 4 月 7 日
Thank you for your response.
Can you elobrate. Please.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by