Psychtoolbox - Error using Screen in new computer

47 次查看(过去 30 天)
Hello everyone,
I'm working on stimuli presentation with Pyschtoolbox.
I have a script that is working very well on one computer, and when I use another computer, it doesn't work anymore.
For example, for this line of code:
Screen('DrawLines', w, ...
[StimScreen.screencenter(1)-250, StimScreen.screencenter(1)+250, ...
StimScreen.screencenter(1), StimScreen.screencenter(1); ...
StimScreen.screencenter(2), StimScreen.screencenter(2), ...
StimScreen.screencenter(2)-250, StimScreen.screencenter(2)+250], ...
20, StimScreen.textcolor);
I get this error:
Error using Screen
Usage:
[minSmoothLineWidth, maxSmoothLineWidth, minAliasedLineWidth, maxAliasedLineWidth] = Screen('DrawLines', windowPtr, xy
[,width] [,colors] [,center] [,smooth][,lenient]);
To be noted is that the same kind of error (with usage suggestion, not further specified) might appear as well with other functions of psychtoolbox, not only Screen - DrawLines.
Again, It works perfectly on another pc, what might be interfering in the new pc?
I'm using Matlab 2021b on the new computer.
Thanks
  6 个评论
Walter Roberson
Walter Roberson 2023-5-12
As a long shot:
The code posted would have problems if the screen is not at least 501 by 501

请先登录,再进行评论。

回答(1 个)

Shubham
Shubham 2023-5-31
Hi Francesca,
It is possible that the issue is related to the version of Psychtoolbox installed on the new computer. There might be some incompatibilities with some functions or code that were written for previous versions of Psychtoolbox.
It is recommended that you check the version of Psychtoolbox on both computers to ensure they match. You can do this by typing Screen('Version') in the command window. It will show you the version information of the Psychtoolbox installed on that computer.
Also, make sure that you have correctly installed and set up Psychtoolbox on the new computer. Ensure that all necessary dependencies and drivers are installed like OpenGL, Microsoft C++ Redistributable Packages, DirectX runtime and that the paths are set up correctly.
Another possible issue could be the graphics card being used on the new computer. Some graphics cards might not be supported by Psychtoolbox, or there may be issues with the drivers. Ensure that the graphics card on the new computer is compatible with Psychtoolbox.

类别

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