Azzera filtri
Azzera filtri

Psychtoolbox - Error using Screen in new computer

32 visualizzazioni (ultimi 30 giorni)
FRANCESCA MITI
FRANCESCA MITI il 12 Mag 2023
Risposto: Shubham il 31 Mag 2023
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 Commenti
Walter Roberson
Walter Roberson il 12 Mag 2023
As a long shot:
The code posted would have problems if the screen is not at least 501 by 501

Accedi per commentare.

Risposte (1)

Shubham
Shubham il 31 Mag 2023
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.

Community Treasure Hunt

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

Start Hunting!

Translated by