Matlab codes for "Amplitude-aware Permutation Entropy: Illustration in Spike Detection and Signal Segmentation"