Determination of Event set from matrix
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!