skip to content

Centre for Neuroscience in Education


For the following worked example, you will need MATLAB Software on your computer. Make a working folder and include it within your MATLAB path.  Download the following three scripts and the sound file into your working folder.

  1. SAMPH_1_Extract5x3_single.m

  1. MFB_coeffs.m

  1. sample_advance.m which can be found here. Sample_Advance
  2. Sound file Ex1_Mary.wav  []


To extract the SAMPH from the sound file, at the MATLAB command line type:

FileName = ‘Ex1_Mary.wav’;

FSamp = 44100;

[Y,tA,CF,CF_MFB,NSamp] = SAMPH_1_Extract5x3_single(FileName,FSamp);


The variable tA, now in the MATLAB workspace, contains the 5 x 3 matrix of the S-AMPH. Don’t forget to save the variables in your workspace.

The S-AMPH waveforms can be plotted using the script found here: Plot_tA


Plot S-AMPH matrix tA

Home page