Converting hourly arrays to daily
1 次查看(过去 30 天)
显示 更早的评论
Hey all, I hope you are well!
I have a 31 x 1 cell which includes 3D arrays (81x69x8760 or 8784 in leap years); The 81 is longitude, the 69 is latitude, and 8760 or 8784 is hours in a year. I want to change hourly to daily (using mean) scale (81x69x365 or 366 in case of 8784), but there is a little bit of complexity that I can't handle it.
I want to ignore the first hour in the first array, and use the first hour in all other arrays as the last hour in the previous array, and finally, I don't need the last array (31st), in fact, I just keep it for use it first hour as last hour in previous (30th) array.
So the results that I need are a 30x1 cell with 81x69x365 or 366 (in leap years) arrays.
As the file is too large to attach I just attach a 2x1 cell as a test.
I would be grateful if you can help me with this issue.
Best Regards.
0 个评论
采纳的回答
Ameer Hamza
2020-3-24
There is some issue with the mat file you attached. It appears to be blank when opened in MATLAB R2020a. You can use the retime function to change the interval from hourly to daily: https://www.mathworks.com/help/matlab/ref/timetable.retime.html
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!