필터 지우기
필터 지우기

Timetable with 15 min averages

조회 수: 3 (최근 30일)
Anna Go
Anna Go 2019년 7월 12일
댓글: Anna Go 2019년 7월 13일
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
Walter Roberson
Walter Roberson 2019년 7월 12일
I would suspect that you have duration values rather than datetime values.

댓글을 달려면 로그인하십시오.

채택된 답변

Jon
Jon 2019년 7월 12일
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))
  댓글 수: 1
Anna Go
Anna Go 2019년 7월 13일
Thanks! works perfectly

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time Series Events에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by