Page 1 of 1

Matlab Path Issues

Posted: Wed Jan 16, 2019 5:35 pm
by aafox
Hi All,

I've been having issues with folders being removed from my Matlab path on startup. Any folder that contains the text 'opensim' that is on the Matlab path is removed each time I re-open Matlab. This has only started happening after I reconfigured Matlab to use version 4.0, and I believe is a symptom of how this was updated, as when I ran the configureOpenSim script it removed these same folders from the path in (I think) an attempt to remove old versions of Opensim code.

Any ideas on a way to stop this from occurring?

Aaron

Re: Matlab Path Issues

Posted: Thu Jan 17, 2019 11:41 am
by jimmy
The configureOpenSim script removes all paths with 'opensim' by design-- this reduces the risk of using the incorrect libraries on a system with multiple versions (3.3 and 4, for example). All paths with 'opensim' are only wiped when the script is run-- if you are seeing folders removed from your Matlab path at Startup, that is a Matlab issue. Either you are not saving the paths, or something else is happening on the Matlab side to reset the paths on Startup.

Since most of us have custom script paths, I would suggest naming them as 'osim' instead of opensim so that they don't get wiped when you run configureOpenSim.

Re: Matlab Path Issues

Posted: Thu Jan 17, 2019 3:55 pm
by aafox
Thanks James. I figured a simple rename would be the easiest way around whatever Matlab's problem is - hopefully I don't have to many "opensim" folders.

Aaron

Re: Matlab Path Issues

Posted: Tue Jan 29, 2019 4:07 pm
by aafox
Just as a reference if this happens to anyone else, simply changing the folder names and then re-adding them into the path using the pathtool within the Matlab GUI didn't work - the folders still disappeared from the path when I restarted the software. I've changed the names of the folders and manually added the folder paths to the pathdef.m file in the Matlab program files and this seems to have resolved the issue.

Still no idea why it was happening in the first place though...