Arranging events based on hours of rainfall
Show older comments
I have the following table of rainfall events separated by NaN.
Date Time (Hours) NumOfHours Total Rainfall(mm)
___________ ____________ __________ __________________
NaT NaN NaN 6
06-Apr-2019 09:00:00 1 1.02
06-Apr-2019 10:00:00 2 0.51
06-Apr-2019 11:00:00 3 0.25
NaT NaN NaN 7
17-Apr-2019 03:00:00 1 0.51
17-Apr-2019 04:00:00 2 0
17-Apr-2019 05:00:00 3 0
17-Apr-2019 06:00:00 4 0.25
17-Apr-2019 07:00:00 5 0.25
NaT NaN NaN 8
29-Apr-2019 08:00:00 1 0.76
29-Apr-2019 09:00:00 2 0.25
NaT NaN NaN 9
02-May-2019 22:00:00 1 3.3
02-May-2019 23:00:00 2 0
03-May-2019 00:00:00 3 0
03-May-2019 01:00:00 4 0.25
NaT NaN NaN 10
03-May-2019 16:00:00 1 1.02
03-May-2019 17:00:00 2 0.51
NaT NaN NaN 11
05-May-2019 06:00:00 1 0.76
NaT NaN NaN 12
13-May-2019 16:00:00 1 1.52
I would like to order the events based on the total number of hours in numerical order (and subsequently chronologinal order based on the date). So it looks like:
ThemeCopy
Date Time (Hours) NumOfHours Total Rainfall(mm)
___________ ____________ __________ __________________
NaT NaN NaN 11
05-May-2019 06:00:00 1 0.76
NaT NaN NaN 12
13-May-2019 16:00:00 1 1.52
NaT NaN NaN 10
03-May-2019 16:00:00 1 1.02
03-May-2019 17:00:00 2 0.51
NaT NaN NaN 8
29-Apr-2019 08:00:00 1 0.76
29-Apr-2019 09:00:00 2 0.25
NaT NaN NaN 6
06-Apr-2019 09:00:00 1 1.02
06-Apr-2019 10:00:00 2 0.51
06-Apr-2019 11:00:00 3 0.25
NaT NaN NaN 9
02-May-2019 22:00:00 1 3.3
02-May-2019 23:00:00 2 0
03-May-2019 00:00:00 3 0
03-May-2019 01:00:00 4 0.25
NaT NaN NaN 7
17-Apr-2019 03:00:00 1 0.51
17-Apr-2019 04:00:00 2 0
17-Apr-2019 05:00:00 3 0
17-Apr-2019 06:00:00 4 0.25
17-Apr-2019 07:00:00 5 0.25
Accepted Answer
More Answers (0)
Categories
Find more on Timetables 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!