필터 지우기
필터 지우기

Help with plotting hourly data

조회 수: 1 (최근 30일)
Sayantan Sahu
Sayantan Sahu 2018년 1월 9일
댓글: Torsten 2018년 1월 10일
I have hourly data for three months. I want to calculate the hourly mean and plot hourly mean against the hour. How do I achieve this ?
I have two separate arrays - an array of hours and an array with the data.
My data is not arranged by hours. I guess I need to arrange the data by each hour first.

답변 (1개)

Torsten
Torsten 2018년 1월 9일
https://de.mathworks.com/matlabcentral/fileexchange/1673-cumulative-mean
Best wishes
Torsten.
  댓글 수: 2
Sayantan Sahu
Sayantan Sahu 2018년 1월 9일
My data is not arranged by hours. I guess I need to arrange the data by each hour first. I am not sure if the 'cumulative mean' does that and if not how to do it ?
Torsten
Torsten 2018년 1월 10일
I assumed that you have data of the form
1 x(1)
2 x(2)
3 x(3)
...
3*30*24 x(3*30*24)
and that you try to plot
1 x(1)
2 (x(1)+x(2))/2
3 (x(1)+x(2)+x(3))/3
...
3*30*24 (x(1)+x(2)+...+x(3*30*24))/(3*30*24)
To do this you can use the MATLAB code I gave you a link to.
Best wishes
Torsten.

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

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by