How to show the date and time with retime function?
1 次查看(过去 30 天)
显示 更早的评论
Good morning,
I have a timetable (TT) which contains in the first column the time (TT_time)and in the second column the water height values (TT.value).
I have applied the retime function to calculate the daily maximum with the following line:
Max=retime(TT,'daily','max').
The result shows the daily maximum and its date (e.g. '07-Jan-1994') but does not retain the time at which the maximum was recorded.
So how can I display the date and time when the daily maximum was recorded (e.g. '07-Jan-1994 14:20:00)?
Thank you for your answers!
0 个评论
回答(1 个)
Corey Silva
2022-5-18
Because you are retiming the Timetable to daily, you are only going to see the max value for that day. If you want to get the timetable's row at the max recorded value, you could do something like this:
>> [~,maxidx] = max(TT.value);
>> TT(maxidx,:)
0 个评论
另请参阅
类别
在 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!