Finding out the average values per day
조회 수: 24 (최근 30일)
이전 댓글 표시
I've got a 7536x2 table that shows hourly values per day over 10 months. I would like to find out the average value for each day of the year and plot it. Any thoughts?
댓글 수: 0
답변 (1개)
Akira Agata
2018년 4월 16일
Like this?
% Sample Data (Hourly values per day over 10 months)
Time = [datetime(2018,1,1):hours(1):datetime(2018,10,1)]';
Data = rand(size(Time));
YourData = table(Time,Data);
% Convert to timetable
TT = table2timetable(YourData);
% Calculate average value per day
DailyAvg = retime(TT,'daily','mean');
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!