Problem when using retime
Show older comments
I have a timetable with temperature data from a meteorological station.
I use following function to pick out the daily maximum values and that works fine.
dailymax = retime(temptt, 'daily', 'max');
My problem is that in the column with the date and time (in the the resulting timetable), the time changes to 0:00 in every row. My date format is yyyy-mm-dd hh:mm.
Is there anyone who knows how to fix this?
Accepted Answer
More Answers (1)
Peter Perkins
on 31 Jan 2019
0 votes
Sofie, if I understand correctly, you want to find, within each day, the maximum temperature, and the date/time at which that maximum occurred. Guillaume is correct that retime can't do that, unless you trick it. But there are easier ways.
As Guillaume says, splitapply is one way. Another is in my response to the same question a couple weeks ago.
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!