Error when running OldNewRecogExp from psychtoolbox

6 次查看(过去 30 天)
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?

回答(1 个)

Star Strider
Star Strider 2012-7-11
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 个评论
Larissa
Larissa 2012-7-25
I believe it is a problem with Windows, because I can run the script with no problem on OSX. Thanks for your input.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Installation and Operational Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by