Filter löschen
Filter löschen

Timetable with 15 min averages

3 Ansichten (letzte 30 Tage)
Anna Go
Anna Go am 12 Jul. 2019
Kommentiert: Anna Go am 13 Jul. 2019
Hi everyone,
I have a table with 1min data over a period of 24h. I attached the csv document I am using.
I want to create 15 min averages. However I don't know how to do the 15 min averages.
This is the code I am using:
house_load = readtable('Load_profile_1.csv');
house_load = table2timetable(house_load);
newTimes = [datetime('00:00:00','Format','HH:mm:ss'):minutes(15):datetime('23:59:00','Format','HH:mm:ss')];
avg_house_load = retime(house_load,newTimes,'mean')
I get an error message in line 3.
Any idea how I could get 15 min averages for my data.
Thanks!
  1 Kommentar
Walter Roberson
Walter Roberson am 12 Jul. 2019
I would suspect that you have duration values rather than datetime values.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jon
Jon am 12 Jul. 2019
Try this for your fourth line (and skip your third line assigning new_times, as it is not needed with this approach)
house_load = retime(house_load,'regular','mean','TimeStep',minutes(15))

Weitere Antworten (0)

Kategorien

Mehr zu Time Series Events finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by