Hi Mario,
I paste here the information you asked.
PsychStartup: Adding path of installed GStreamer runtime to library path. [D:\gstreamer\1.0\msvc_x86_64\bin]
- If I run the ‘Screen’ function, I initially get this:
In place of the expected mex file this placeholder file was executed:
Screen
This mex file seems to be missing or inaccessible on your Matlab path or it is dysfunctional:
Screen.mexw64
It is important that the folder which contains the Screen mex file is located before
the PsychBasic folder on your Matlab path.
On Matlab V7.4 (R2007a) or later versions, the folder
C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\ must be before the folder
*C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox\PsychBasic\ *
type path to display the current path and check for this condition.
If the order is wrong, simply cd into your Psychtoolbox root folder
C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox\ and then run SetupPsychtoolbox again.
That is the simplest way of fixing such path problems - Or to get more diagnostic output.
Seems Screen.m is in the Matlab path before/above Screen.mexw64 instead of after/below it!
This will cause the mex file to be ignored, leading to this error.
Please run SetupPsychtoolbox again, to rectify this problem, or use Matlabs pathtool
to shuffle things into the right order. This folder:
C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a
needs to go above/before this folder:
C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox\PsychBasic
On Microsoft Windows with supported Matlab versions (>= V7.4) it could also be that
the required Visual C++ 2015-2019 runtime libraries are missing on your system.
The Psychtoolbox/PsychContributed/ subfolder contains installer files for them, which
you can execute after quitting Matlab. The name of the file is:
vcredist_x64_2015-2019.exe and maybe also vcredist_x64_2010.exe.
NOTE: You may want to acquire paid support for future issues like this.
Please type ‘PsychPaidSupportAndServices’ to learn more.
Error using AssertMex (line 216)
Missing or dysfunctional Psychtoolbox Mex file for this operating system. Read the help text above carefully!!
Error in Screen (line 158)
AssertMex(‘Screen.m’);
- Then I run “SetupPsychtoolbox” as suggested, and I get this:
Will setup working copy of the Psychtoolbox folder inside: C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox
Your old Psychtoolbox appears in the MATLAB/OCTAVE path:
Your old Psychtoolbox appears 1084 times in the MATLAB/OCTAVE path.
Before you decide to delete the paths, do you want to see them (yes or no)? n
You didn’t say “yes”, so I’m taking it as no.
Shall I delete all those instances from the MATLAB/OCTAVE path (yes or no)? y
Success.
Now adding the new Psychtoolbox folder (and all its subfolders) to your MATLAB/OCTAVE path.
Success.
Running post-install routine…
PsychStartup: Adding path of installed GStreamer runtime to library path. [D:\gstreamer\1.0\msvc_x86_64\bin]
Matlab release 2014b or later detected. Will prepend the following
folder to your Matlab path: C:\Users\User1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Psychtoolbox-3\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\ …
PTB-INFO: Multi-display setup in explicit multi-display mode detected. Using the following mapping:
PTB-INFO: Screen 0 corresponds to the full Windows desktop area. Useful for stereo presentations in stereomode=4 …
PTB-INFO: Screen 1 corresponds to the display area of the monitor with the Windows-internal name \.\DISPLAY1 …
PTB-INFO: Screen 2 corresponds to the display area of the monitor with the Windows-internal name \.\DISPLAY2 …
*PTB-INFO: Your version of Matlab 64-Bit is global system DPI aware. On Windows-8 or later, fullscreen onscreen windows will only work *
PTB-INFO: properly timing-wise when displayed on displays with the same pixel density as your systems primary display monitor.
PTB-INFO: For your multi-display setup the stimulus display monitor must have a DPI of (144, 144), matching that of
PTB-INFO: your primary display monitor. Ideally you will only display on the primary display in the first place.
PTB-INFO: Displaying on anything with a different DPI will cause mysterious visual timing problems, sync failures etc.
PTB-INFO: Read ‘help RetinaDisplay’ for more info on this topic.
Trying to trigger an update of the fontconfig cache if that should prove neccessary.
This may take a couple of seconds, or sometimes even minutes. Please be patient…
Done with post-installation. Psychtoolbox is ready for use.
GENERAL LICENSING CONDITIONS AND TERMS OF USE:
----------------bla bla--------------------
BEGINNERS READ THIS:
------bla bla---------
Enjoy!
-
After doing this, I run the ‘Screen’ function again and it works.
-
It is necessary to run “SetupPsychtoolbox” at every new session, irrespective of whether I run MATLAB as Administrator or not.
-
“which pathdef” always gives me:
C:\Program Files\MATLAB\R2024a\toolbox\local\pathdef.m
I hope this helps.
Giorgio