Changed find_wave_max to order the peaks from right to left rather than largest to smallest. This is a more natural choice as we are concerned with the (typically) rank ordered wave train.
Changed find_wave_max to order the peaks from right to left rather than largest to smallest. This is a more natural choice as we are concerned with the (typically) rank ordered wave train.

ddeepwel/SPINSmatlab