GDXMRW: How can I adjust the startup Matlab Path on Linux or Mac?

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Locked
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

GDXMRW: How can I adjust the startup Matlab Path on Linux or Mac?

Post by abhosekar »

Note: Starting with GAMS version 38, GAMSTransfer Matlab is the preferred way to transfer data between Matlab and GAMS.

For GDXMRW,

I run Matlab on a machine where I have no root privileges so updating the system-wide ''pathdef.m'' is not possible. However, Matlab checks the MATLABPATH environment variable on startup and prepends that to its search path, so setting this in your ''.bashrc'' or similar startup file should have the desired affect. For example, I have something like this:

Code: Select all

oxon$grep MAT .bashrc
export MATLABPATH=/usr/local/gams/23.7.2:/home/steve/comp-pak/src/interfaces/Matlab
oxon$echo $MATLABPATH
/usr/local/gams/23.7.2:/home/steve/comp-pak/src/interfaces/Matlab
Locked