matlab code to extract and analyze SD task behavior