Matlab script for TSS analysis using the Pattern Recognition course code