Error when running OldNewRecogExp from psychtoolbox

4 views (last 30 days)
I am trying to run OldNewRecogExp from psychtoolbox, using 32-bit MatLab (psychtoolbox won't work on 64 bit) on Windows 7.
I input OldNewRecogExp(99,1) just as the instructions say to do. The experiment starts and asks me to press the mouse button to begin the experiment. It also says to press 'n' after the first image disappears. I press the mouse button and an image is shown; when it disappears I press the n key. Then the experiment closes and I get this error:
Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier.
Error in OldNewRecogExp (line 313) fprintf(datafilepointer,'%i %i %s %i %s %i %s %i %i %i\n', ...
Anyone know what the problem is?

Answers (1)

Star Strider
Star Strider on 11 Jul 2012
You need to open ‘psychtoolbox’ and find the ‘fopen’ statement that creates ‘datafilepointer’, or wherever ‘datafilepointer’ is first defined. It could be trying to create a file in a directory that doesn't exist or that MATLAB can't find.
Also see what the value for ‘datafilepointer’ is. It should be >= 3. If it's -1 MATLAB can't open the file.
To solve the problem, it might be necessary for you to contact whoever wrote ‘psychtoolbox’.
  1 Comment
Larissa
Larissa on 25 Jul 2012
I believe it is a problem with Windows, because I can run the script with no problem on OSX. Thanks for your input.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!