
% To run CPLEX in MATLAB 
addpath /chalmers/sw/unsup/cplexmex/dist
setenv ('ILOG_LICENSE_FILE',['/chalmers/sw/sup/cplex-12.1/ilm/access.ilm'])
% the driver routine is called cplexmex. 
%try 'help cplexmex' and 'help cplexmexparams'
% makecplex
matlab_Version='matlab-2009b';  %change here when matlab is updated
cplex_Version='cplex-12.1';     %change this for new cplex
matlabPath=['/chalmers/sw/sup/',matlab_Version];
setenv('ILOG_LICENSE_FILE', ['/chalmers/sw/sup/',cplex_Version,'/ilm/access.ilm']); 
setenv('LD_LIBRARY_PATH',[matlabPath,'/bin/sol2:',matlabPath,'/sys/os/sol2:',matlabPath,'/bin/glnx86:',matlabPath,'/sys/os/glnx86']);
addpath /chalmers/sw/sup/cplex-12.1/cplex121/matlab
testcplex   % tests if the cplex runs fine or not
