Faq attempt to run script as a function error after install PLS Toolbox
Why do I get "attempt to run script as a function" errors after I install PLS_Toolbox?
Examine your path using either the
path command or the
pathtool. It is likely that your path contains many extra folders which end in "\ja". These folders are something the Mathworks creates when you install Matlab. If you look at any of the files in these folders, they contain only the help text of each of the m-filies. If they get added to the path, the error message is almost always "Attempt to run a script as a function" and is given for some miscellaneous Matlab function (something other than a PLS_Toolbox function).
Q: How did I get those ja folders on my path?
It is likely that, at some point, you've clicked "Add with Subfolders" in the pathtool and selected the base C:\MATLAB6p5\toolbox\ folder. (It may have been that you misread the PLS_Toolbox instructions which say to use this feature but to do it NOT on the C:\MATLAB6p5\toolbox\ folder but on the C:\MATLAB6p5\toolbox\PLS_Toolbox folder!)
The problem is with Matlab in that the "Add with Subfolders" button is not intelligent enough to ignore the "\ja" folders.
To fix the problem, bring up the pathtool (type
pathtool at the Matlab prompt), select "Default" from the bottom. This will reset the Matlab path to the default settings. To re-enable PLS_Toolbox, you must now re-install PLS_Toolbox by changing the working directory to the base PLS_Toolbox folder and running
evriinstall in that directory.
Still having problems? Please contact our helpdesk at firstname.lastname@example.org