I am running some behavioral experiments and using psychtoolbox to present sinusoidal gratings on the screen and then activating water delivery using a NIDAQ board. This happens for multiple trials and is therefore in a loop. The problem I am facing is that Matlab will randomly hang within the loop and using print statements I have narrowed down the problem to executing the "flip" command. I have tried many of the recommended solutions including reinstalling Matlab and Psychtoolbox. This code was working and now doesnt and nothing has changed on the computer. Since Matlab hangs and it says that the PTB window is unresponsive I simply have to quit Matlab and restart and thus I have no access to the error.
Has this error been reported? Any suggestions / debugging ideas ?
Thanks!
Anu