Code for fitting psychometric functions in Matlab using maximum likelihood estimation