Determination of Event set from matrix
Show older comments
Hello
I have a matrix set as below
2024 8 1 5
2024 8 2 2
2024 8 3 5
2024 8 4 5
2024 8 5 2
2024 8 6 3
2024 8 7 5
2024 8 8 5
2024 8 9 4
2024 8 10 3
2024 8 11 5
2024 8 12 5
The first three columns show year, month and day & the last column show index for event set. If the last column is 5, then it would be qualified as one event. If the last column is 2 in between, for example, for 1/8/2024 to 4/8/2024, both these events are considered as part of the same event with event duration 4 days. However, 5/8/2024, is not followed by 5, so they are not the part of event that ended on 4/8/2024. Please suggest how I can join these two events and determine event duration if they are sandwitched by a small event with event index 2.
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!