Help with plotting hourly data
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Torsten
2018-1-9
https://de.mathworks.com/matlabcentral/fileexchange/1673-cumulative-mean
Best wishes
Torsten.
2 个评论
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 Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!