matlab code for the psychophysics experiment