Measuring distance between 2 "clumps" of data that meet certain conditions

3 views (last 30 days)
For a project, i have data in the form of wind speed (m/s) recorded with 1 minute intervals, starting from 2009 through to 2021. For the time of each recording I have created a datetime array in the form of yyyy:MM:dd_HH:mm:ss, and for the wind speed recorded at each minute i have created a double array.
The wind speed ranges from 0 through to 40+ m/s. For the project, the machnes can safely operate between wind speeds of 0-20 m/s. The machinery is damaged and can fall over when wind speeds reach 30m/s and above, Therefore, i need to measure the time taken for the wind speed to go from 20 to 30 m/s. The data is measured by 1 minute increments, from 2009 - 2020, so the data is quite messy when plotted. I have been given the following conditions that simplify measuring the time taken to go from 20 - 30 m/s.
  • When speed exceeds 20 m/s, the first 2 consequtive points above the 20 m/s limit will be the 'initial point'.
  • when speed exceeds 30 m/s, the first 2 consequtive points above the 30 m/s limit will be the 'final point'.
I need to record the time taken between the 'initial point' and the 'final point'. As there is a lot of data, the cases where wind speed goes from 20-30 occures several times, and ill need to record the corresponding time taken for each case.
Thanks very much :)

Answers (0)

Categories

Find more on Graphics Object Identification 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!