I hope you find these MATLAB codes useful, but use them at your own risk. Enjoy!
I wanted a way to quickly import RD Instruments ADCP data recorded in WinRiver II to MATLAB. Most of the packages I found either had other dependencies or read the binary directly which resulted in some weird errors. Rather than totally reinvent the wheel, I wrote a code to read in files generated using the "Classic ASCII" output in WinRiver II. Note that while this code works for my purposes, it has zero error checking built in and could fail miserably for you. adcp_ascii.m
This pair of m-files takes speed and direction and returns east and north components (geographic convention) or takes your east and north components and gives you speed and direction. This is useful for ADV or ADCP velocity data, wind data, and many other data types. Both functions should work on N-dimensional matrices. sd2uv.m uv2sd.m
This code processes the .mat files produced within the Ruskin software package for RBR CTDs. It is optimized for CTDs using the thresholding deployment scheme, and might have to be modified depending on how many external sensors your CTD is set up with. Tested with an XRX-620 CTD. rbrctd.m
This code lets you average (or find the median, or standard deviation, or any function of your choosing) values into bins based on another value. For example, if you have multiple measurements of velocity with depth and then want to get the average velocity values in, say, 0.5-m bins, this is the code for you. binit.m
The Micromeritics SediGraph is often used to determine the grain size of fine sediment particles. This simple code reads .RPT files output by the machine into a MATLAB structure. sedirpt.m
During a brief foray into the world of underwater acoustics I found the need to compute the acoustic absorption coefficient of seawater, often referred to as α. This code does it for you, following Ainslie & McColm (1998). compute_absorption.m