Page 1 of 1

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

Posted: Fri Jan 21, 2022 8:40 pm
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