The pre-cursors, firstly:
Ubuntu Linux 20.04
Matlab R2021b 64-bit
PTB 3 v3.0.19 sourced from NeuroDebian (with Mario’s patches to CalibrateMonSpd.m as previously discussed).
Paid support info:
Order Numbers: TJ3HSUNX and VCCC6L4H
Where is the PTB script or macro that automatically updates the Matlab path upon starting Matlab?
This is a “temporary problem”, as we are part-way through an experiment and don’t want to change or update PTB in case it causes the experiment script to crash. Hence we are stuck with an old version of PTB3.
The issue is that I have changed a few lines in one or two PTB functions to make them suit our experiment, and saved those modified files in a separate directory (mainly because PTB3 installs by default in /usr/share and non-sudo users can’t save from Matlab to those directory locations). In order to ensure Matlab calls up my modified functions - and not the old, unmodified PTB versions of those functions - I deleted one or two PTB folders from the Matlab path and added the path to my local directory in their place.
All was good, until we came back the next day and re-started Matlab, whereupon the old, redundant directory references had been re-inserted into pathdef.m.
Therefore the experimenter needs to edit the Matlab path each time Matlab is started, to remove those redundant folders from the pathdef and ensure Matlab finds the correct, modified functions in my local directory.
I tried re-naming the directories in usr/share/psychtoolbox-3/ to be (for example) “PsychHardware_old”, but the very clever PTB script added a reference to those “_old” folders in the Matlab path! So it still requires the path to be edited each time Matlab is re-started.
I appreciate this is a problem of my own making, in a sense, because PTB is only doing what it was designed to do, and ensuring the Matlab path allows access to all PTB functions. However… it’s a real pain for us, until the current experiment is done and we can update PTB3.
The question is: where is the PTB script or macro that is updating the Matlab path? I searched for a startup.m and looked in PsychStartup.m and PsychInitialize.m, but nowhere seems to be updating the Matlab path, as far as I can see.
All suggestions or insights gratefully received (especially by the person running the experiment, who has to keep going into “Set path” each morning!).
Thanks,
Eric