MATLAB Answers

How to find the corresponding date to each found maximum value?

11 views (last 30 days)
SaaraL
SaaraL on 22 Feb 2021
Commented: SaaraL on 26 Feb 2021
I have a timetable 79880x42 with precipitation data:
Date Station 1 Station 2 Station 3 ...
'01-Jan-2011 00:00:00' 0 0 0
'01-Jan-2011 01:00:00' 0.3 0 0
'01-Jan-2011 02:00:00' 0.4 0 0.6
'01-Jan-2011 03:00:00' 1.2 0 0.8
I found the maximum value TTmax = retime(tt,'yearly','max'), tt=timetable, but this only gives the matrix with max values
How do I get the yearly maximum values of each station WITH the corresponding date and time?
  2 Comments
SaaraL
SaaraL on 26 Feb 2021
The maximum values for each station are at different times, so I need to get the maximum for each station for each year and at what time was the maximum registered. Is that possible? It should look like:
Registered time Station 1 max (mm) Registered time Station 2 max (mm)
2011 07.07.2011 13:00 46 18.06.2011 11:00 36
And so forth

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!