Detect increasing or decreasing depth

3 views (last 30 days)
I have a timetable of oceanographic data collected by a CTD. The time series contains data on the instrument depth, water temperature and salinity. The instrument is on a fixed mooring, so an increasing value for depth means that the tide is rising, and vice versa, however there is also noise in this data set from waves.
My aim is to be able to select data (temperature and salinity) from when the tide is either rising or falling, to determine wether the water is warmer on the ebb tide than flood tide.
Can someone point me in the right direction for how I'd begin to go about this?
Thanks in advance!

Accepted Answer

Star Strider
Star Strider on 28 Jun 2022
Assuming the data are contaminated with broadband (rather than band-limited) noise, the different columns are observations and each row corresponds to a monotonically-increasing time value, use the sgolayfilt function to elimiinate as much noise as possible (this will require experimentation, I usually use an order 3 polynomial and then vary the framelen value until I get the desired result) and then use the gradient function to determine the direction of change, for example:
dPdt = gradient(Pressure) ./ gradient(time);
Use the sign of ‘dPdt’ to guide the rest of the analysis.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!